gpt4 book ai didi

msbuild - 错误 RG0000 : Could not load file or assembly 'xxx' or one of its dependencies. 访问被拒绝

转载 作者:行者123 更新时间:2023-12-03 03:28:07 24 4
gpt4 key购买 nike

这是针对 VS2010 下的 Windows 窗体项目。

这是我从 MSBuild 收到的消息:

error RG0000: Could not load file or assembly '3rdPartyAssemblyUsedByProject, Version=1.1.263.0, Culture=neutral, PublicKeyToken=687bce93d7ce902c' or one of its dependencies. Access is denied. Line 174 , position 5. [C:\xxx\src\BackOffice.csproj]

这是用于启动此操作的命令行:

c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/msbuild.exe BackOffice.csproj /p:PlatformTarget=x86

resx 文件的第 174 行归因于错误:

<data name="generalImages.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
...
</value>
</data>

generalImages 是一个 ImageList 控件,其中包含用于表单上按钮的图像。

这在我的开发机器上工作正常,但在我的构建服务器上有问题。我的工作站是Windows 7 64位,构建服务器是Windows 2008 Server 64位。构建服务器确实安装了 Windows 7.1 sdk。

如果我使用 v3.5 框架中的 msbuild,编译会成功完成。我确实收到了这条警告消息,但目前它并没有给我带来任何问题:项目文件包含 ToolsVersion="4.0",此版本的 MSBuild 不支持该版本。将项目视为具有 ToolsVersion="3.5"。

这样做的全部原因是实际针对 4.0 框架并使用方法默认值等内容,而这些在针对 3.5 时不起作用。

我已经搜索了这个问题。我遇到过很多与 32 位/64 位问题相关的点击 - 其中图像格式是问题,但这不是我的问题。此错误显示“访问被拒绝”。我确实使用 fuslogvw 尝试找出拒绝访问的来源 - 但我没有看到它,但它实际上没有找到任何程序集。该程序集不在 GAC 中,而是位于项目文件引用所在的项目文件的切线目录中。

这是融合日志:

* Assembly Binder Log Entry (8/30/2010 @ 1:44:48 PM) *

The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll Running under executable C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\ResGen.exe --- A detailed error log follows.

=== Pre-bind state information === LOG: User = domain\user LOG: DisplayName = 3rdPartyAssemblyUsedByProject, Version=1.1.263.0, Culture=neutral, PublicKeyToken=687bce93d7ce902c (Fully-specified) LOG: Appbase = file:///C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = NULL Calling assembly : System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\ResGen.exe.Config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config. LOG: Post-policy reference: 3rdPartyAssemblyUsedByProject, Version=1.1.263.0, Culture=neutral, PublicKeyToken=687bce93d7ce902c LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject.DLL. LOG: Attempting download of new URL file:///C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject/3rdPartyAssemblyUsedByProject.DLL. LOG: Attempting download of new URL file:///C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject.EXE. LOG: Attempting download of new URL file:///C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject/3rdPartyAssemblyUsedByProject.EXE. LOG: All probing URLs attempted and failed.

此时——我被难住了。不知道下一步该去哪里。欢迎任何建议。

科特

最佳答案

它看起来很像描述的已知 VS 2010 bug here on blogs.msdn.com 。如果是这样,微软似乎决定最早要到 Visual Studio 11 才修复它,并且对于许多人(包括我们 :| )来说,帖子中提到的解决方法都不起作用。祝你好运。

关于msbuild - 错误 RG0000 : Could not load file or assembly 'xxx' or one of its dependencies. 访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3603838/

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