News

Laurent Kempé MVP JetBrains Academy Member

Contact

My status

View Laurent Kempé's profile on LinkedIn
XING
twitter
facebook


Xbox 360



Map

Locations of visitors to this page

.NET Dudes

Family

French .NET Dudes

Friends

Links

Tech Head Brothers

Visual Studio and PowerShell Trick

This end of afternoon I worked on the mapping part of my new project for innoveo solutions, a blog engine.

Till now I was using the XML Persistence Engine of Euss but it was time to go to a real mapping and a database.

I ended up with some .bat file in my solution.

For example diffMapping.bat uses WinMerge to compare the mapping I currently use to one that I just generated out of my Domain assembly.

Then I wanted to be able to run this .bat script from the IDE, without having it in Visual Studio 2005 External Tools menu (not tried with 2008 currently). So I tried the right click on the .bat Open With, then gave the path of cmd.exe. That's was not working, it just opened a cmd prompt.

Then I pointed Open With to PowerShell exe and it works!!! It will run you .bat file from Solution Explorer. You can even define it as the default program for .bat and double clicking on a .bat file in Solution Explorer will run it.

Nice no ?!

Comments

Laurent Kempé said:

Following my post " Visual Studio and PowerShell Trick " I had another little issue, I have one mapping

# November 29, 2007 2:10 PM

EricPhan.Info - Take a dip in the deep end said:

Quick tip for those of you who use a batch file to regenerate your data access layer . You might have noticed that if you try to run (double click) a batch file from the solution explorer window it just opens the batch file in a text editor. To make it

# July 21, 2008 5:00 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)