1
我寫了一個後生成腳本我的Visual Studio項目安裝一個新的DLL到GAC使用後生成事件不工作
copy "$(TargetPath)" "$(ProjectDir)\..\..\BuildDependencies\$(TargetFileName)"
if exist "$(ProjectDir)..\..\gac_dll" "$(FrameworkSdkDir)\bin\gacutil.exe" /i "$(TargetPath)" /f
以下是構建輸出。
Build started: Project: ****** Configuration: Debug Any CPU ------
****** -> C:\VSVN Repos\**\**\**\**\**\bin\Debug\**.dll
copy "C:\VSVN Repos\**\**\**\**\**\bin\Debug\**.dll" "C:\VSVN Repos\**\**\**\**\** \\..\..\BuildDependencies\**.dll"
if exist "C:\VSVN Repos\**\**\**\**\**\..\..\gac_dll" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\\bin\gacutil.exe" /i "C:\VSVN Repos\**\**\**\**\**\bin\Debug\**.dll" /f
1 file(s) copied.
========== Build: 4 succeeded or up-to-date, 0 failed, 0 skipped ==========
輸出顯示該文件已被複制。但是當我檢查GAC時,舊的dll仍然存在。它並未從GAC中刪除。有沒有人知道爲什麼該文件沒有被複制?