Add Visual Studio Post-Build Events.

Update: a much better alternative.

One of the most under used features of Visual Studio is the post and pre build events…….

Example: Deploy the assembly to gac and copy the .pdb files in to the assemblies gac directory.
before this gac the assembly and navigate to its (gac) folder from “C:\WINDOWS\Assembly\GAC_MSIL\Assembly NameSpace

1) create a bat file with the following and save it in the bin\debug\postbuild.bat

“C:\Program files\Microsoft Visual Studio 8\SDK\v2.0\Bin\GacUtil.exe” /i Assembly Name.dll/f

xcopy Assembly Name.pdb C:\WINDOWS\Assembly\GAC_MSIL\Assembly name space\ Public Key Token\

2) Right click the project select properties.

3) Navigate to Build Events

4) In the post build event text box enter the following

call “project path\bin\debug\postbuild.bat”

5) Rebuild the solution …

Hope this helps

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: