gpt4 book ai didi

c# - 尝试安装没有强名称的程序集

转载 作者:太空宇宙 更新时间:2023-11-03 22:43:59 24 4
gpt4 key购买 nike

我在我的项目中添加了构建后命令行:

"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil.exe" /if "$(TargetFileName)"

但是我得到了错误:

The command exited with the code 1.

在输出中:

Failure adding assembly to the cache: Attempt to install an assembly without а strong name

我该如何解决这个问题?

最佳答案

这里真的只有两个选项,不要将程序集放入 GAC 或在将程序集放入 GAC 之前对其进行签名。


程序集需要签名才能存储在 GAC 中。

“部署在全局程序集缓存中的程序集必须有一个强名称。” MSDN - Global Assembly Cache

如果您需要帮助签署具有强名称的程序集,请阅读本文。 MSDN - How to sign an assembly


以下是一些相关链接:

Cannot install assembly to cache? <-- 当前的帖子实际上是这个的副本。

Signing assemblies - basics

C#: why sign an assembly?

How to register a non-strong-name assembly to be loaded as if it were in the GAC?

关于c# - 尝试安装没有强名称的程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50862968/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com