【问题标题】:Installing a new dll to GAC using post build event is not working使用构建后事件向 GAC 安装新 dll 不起作用
【发布时间】:2023-03-29 08:32:01
【问题描述】:

我为我的 Visual Studio 项目编写了一个后期构建脚本

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 中删除。有谁知道为什么文件没有被复制?

【问题讨论】:

    标签: c# asp.net build-process gac


    【解决方案1】:

    也许在您的构建后事件中查看您的语法:“\v6.0A\bin\gacutil.exe”” bin 之前有一个双“\”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多