Bookmark and Share

GacUtil from Project File

Due to circumstances involving a MPF package and Text Templating (t4), I had to add an assembly to the GAC after compiling if I wanted to be able to run the generator in the VS Experimental. So, I added the following line to the AfterBuild target of the csproj file:

<Exec Command="gacutil /i $(TargetPath)"/>

Unfortunately, I received the following error when I compiled: 

Error 155 The command "gacutil /i [PathToDll]" exited with code 9009. C:\Projects\AperioVisualStudioAddins\AperioVisualStudioAddins\AperioVisualStudioPackage.csproj 202 2 [DllName]

The problem is that when Visual Studio is building the project, it does not have access to the path. The way to make it work is to specify the fully qualified path and filename to gacutil.

<Exec Command="C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil.exe /i $(TargetPath)"/>

blog comments powered by Disqus

KodefuGuru.GetInfo()

Chris Eargle
LinkedIn Twitter Technorati Facebook

Chris Eargle
Telerik Developer Evangelist, C# MVP

JustCode

Telerik .NET Ninja

 

INETA Community Speakers Program

 

MVP - Visual C#

 

Friend of RedGate

World Map

Tag cloud

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.