开发者

Gac installation issue

I'm following this example on creating a custom url rewrite provider. Everything is building fine, but for some reason nothing is getting installed in the gac. Here's what I've tried in the "Post Build" command:

CALL "%VS100COMNTOOLS%\v开发者_如何学Gosvars32.bat" > NULL gacutil.exe /if $(TargetPath)

CALL "%VS100COMNTOOLS%\vsvars32.bat" > NULL "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64\gacutil.exe" /if $(TargetPath)

"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64\gacutil.exe" /if $(TargetPath)

gacutil.exe" /if $(TargetPath)

The last one actually fails with code 9009 so the third one was used to fix it. The first two I'm totally clueless about. They don't fail, but don't seem to do anything either. The 3rd actually seems to work but navigating to c:\windows\assembly doesn't list my dll in there and when I try to add the provider in IIS it says it can't find it in the gac. My assembly is strongly signed. Any idea of whats going on?


The problem I was having was not that I was looking in the wrong place as @Sergei suggested. I was installing it as a .NET 4.0 assembly and therefore was located elsewhere. The issue with IIS was that my website was running in .NET 3.5 and therefore could not find the assembly.


You can also use the Microsoft Web Deploy Tool (v2 anyway) to install to the gac. Use the "sync" option:

cd "\Program Files\IIS\Microsoft Web Deploy V2"
msdeploy.exe -verb:sync -source:gac Install="c:\path\to\file\ReplaceProvider.dll" -dest:auto
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜