blog.easyciel.net author="Patrick Rabian" about="c#, sharepoint, biztalk, team system resources" more="news, samples, tips for .NET world's developers !"

How to publish an assembly to the GAC while building VS project

Thursday, 7 December 2006 18:25 by prabian

Open class library project properties > Build events and add this script in post-build command line :

"$(DevEnvDir)..\..\SDK\v2.0\Bin\gacutil.exe" /u $(TargetName)

rem IF NOT $(ConfigurationName) == Release GOTO end

:: Copying assembly to the GAC
echo Copying assembly to the GAC
"$(DevEnvDir)..\..\SDK\v2.0\Bin\gacutil.exe" /i "$(TargetPath)"

:end
echo Finished Post Build Event

 

 

The path could be different (bold text). You may have to change it by something like

C:\Program Files\Microsoft.NET\SDK\v2.0\Bin\gacutil.exe
(…and v2.0 by v1.1 for an older framework version….)

or

C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\gacutil.exe
(for the recent Windows SDK Win32+.NET 3.0) 

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , ,
Categories:   .NET Projects
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

November 21. 2008 00:27