這是針對VS2010下的windows窗體項目。錯誤RG0000:無法加載文件或程序集「xxx」或其某個依賴項。訪問被拒絕
下面是我從的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.
在這一點 - 我很爲難。不知道下一步該去哪裏。任何建議都會受到歡迎。
Cort
我手動從命令行中運行此。我已經驗證了我擁有第三方程序集的位置,我登錄的用戶在文件上選中了「完全控制」並且是該文件的所有者。 – Cort 2010-08-30 21:08:34
...還有,我試圖從包括我融合日誌顯示 - 該組件從來沒有真正發現 - 它的位置是在../lib/3rdpartyassembly.dll從的csproj文件的位置。 – Cort 2010-08-30 21:20:47
您可以指定/ P DLL的位置:ReferencePath =」 \ 」。 –
2010-08-30 21:31:27