来自 MSBuild 的 gacutil

发布于 2024-09-09 05:48:18 字数 172 浏览 3 评论 0原文

在我的 MSBuild 文件(TFSBuild.proj,因为我正在运行 Team Builds)中,exec command=gacutil alwys 失败并出现以下错误: 初始化 gacutil 失败 我的构建机器是带有 Team Build 2010 的 W2K3。

任何想法。

非常感谢

in my MSBuild file (TFSBuild.proj since I am running Team Builds) the exec command=gacutil alwys fails with the following error:
Failure initializing gacutil
my build machine is a W2K3 with Team Build 2010.

any ideas.

Many thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过期以后 2024-09-16 05:48:19

您是否安装了.NET框架SDK?我不相信 Gacutil 是标准 .NET 加载的一部分。

Do you have the .NET framework SDK installed? I don't believe Gacutil is part of the standard .NET loadout.

萌︼了一个春 2024-09-16 05:48:18

在系统范围内搜索以下文件: gacutil.exe.config

然后在记事本中打开该文件并检查它引用的 .NET Framework 版本。它可能如下所示:

<?xml version ="1.0"?>
<configuration>
    <startup>
        <requiredRuntime version="v1.1.4322"  />
    </startup>
</configuration>

对于我来说,可能对于大多数具有比版本 1.1 更新的 .NET Framework 的 PC,此配置文件将导致消息“初始化 gacutil 失败”。以下配置文件会更好地工作:

<?xml version ="1.0"?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/>
    </startup>
</configuration>

我在 Nitya-MSFT 的帮助下找到了这个答案。请参阅以下链接,特别是 Nitya-MSFT 的答案:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/49d4a656-40f1-4bb9-b1a7-da0f63557d0e/failure-initializing-gacutil

我客户的 PC 以前是运行 Windows 7 和 Windows 7 的 32 位计算机。 .NET框架1.1。    然后,最近的某个时候,它升级为运行 Windows 10 和 Windows 10 的 64 位操作系统。 .NET框架4.0。      但是,gacutil.exe 仍在针对旧的配置文件 gacutil.exe.config 运行,该文件指向旧的 .NET Framework 1.1。      我使用 Nitya-MSFT 提供的 XML 来创建新的 gactile.exe.config。  当然,我将其与 gacutil.exe 可执行文件一起放入文件夹中。    我的麻烦就消失了!!    非常感谢 Nitya-MSFT。    

Do a system-wide search for the following file: gacutil.exe.config

Then open the file in Notepad and check to see which version .NET Framework it references. It may look like the following:

<?xml version ="1.0"?>
<configuration>
    <startup>
        <requiredRuntime version="v1.1.4322"  />
    </startup>
</configuration>

For me, and probably for most PCs with .NET Frameworks which are more recent than Version 1.1, This config file will cause the message "Failure initializing gacutil". The following config file will work better:

<?xml version ="1.0"?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/>
    </startup>
</configuration>

I came to this answer with help from Nitya-MSFT. See the following link, specifically the answer from Nitya-MSFT:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/49d4a656-40f1-4bb9-b1a7-da0f63557d0e/failure-initializing-gacutil

My customer's PC was previously a 32-bit machine running Windows 7 & .NET Framework 1.1.    Then, sometime recently, it was upgraded to have a 64-bit operating system running Windows 10 & .NET Framework 4.0.      However, the gacutil.exe was still running against an old config file, gacutil.exe.config, which was pointing to the old .NET Framework 1.1.      I used the XML supplied by Nitya-MSFT in order to create a new gacutile.exe.config.   Of course, I placed it into the folder alongside the gacutil.exe executable.     And my trouble went away!!    Much appreciation to Nitya-MSFT.    

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文