aspnet_compiler中的错误?

时间:2012-04-19 10:05:27

标签: aspnet-compiler

我有几个网络项目的解决方案。

我已将每个项目构建到自己的文件夹中(大约有10个项目):

/build/projA
/build/projB
/build/projC

如果我打电话

aspnet_compiler -v / -p \"build/#{proj}\" merged/#{proj}
依次对每一个人来说,一切都很好。

如果我并行地对aspnet_compiler进行了所有10次调用,我会收到程序集加载错误,说引用的程序集正在使用中。

这是一个错误吗?它为什么会被使用?它不应该是。

无法加载的程序集位于多个项目中,但每个项目在其bin文件夹中都有自己的副本。

更新:它似乎发生(对于某些)作为引用引用的程序集。那些装有完整绑定信息的东西似乎有效。

这是来自fuslogvw

的失败加载之一的转储
The operation failed.
Bind result: hr = 0x80070020. The process cannot access the file because it is being used by another process.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = andrew.bullock
LOG: DisplayName = Yahoo.Yui.Compressor
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Yahoo.Yui.Compressor | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///E:/build/ProjA/
LOG: Initial PrivatePath = E:\build\ProjA\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\src_projects_proja\061ad2e7
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\src_projects_proja\061ad2e7
LOG: AppName = 627cc9a9
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\build\ProjA\web.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/src_projects_proja/061ad2e7/627cc9a9/Yahoo.Yui.Compressor.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/src_projects_proja/061ad2e7/627cc9a9/Yahoo.Yui.Compressor/Yahoo.Yui.Compressor.DLL.
LOG: Attempting download of new URL file:///E:/build/ProjA/bin/Yahoo.Yui.Compressor.DLL.
LOG: Assembly download was successful. Attempting setup of file: E:\build\ProjA\bin\Yahoo.Yui.Compressor.dll
LOG: Entering download cache setup phase.
ERR: Error extracting manifest import from file (hr = 0x80070020).
ERR: Setup failed with hr = 0x80070020.
ERR: Failed to complete setup of assembly (hr = 0x80070020). Probing terminated.

1 个答案:

答案 0 :(得分:0)

如果您直接拨打ClientBuildManageraspnet_compiler以外似乎没有问题,不知道原因。

var parameter = new ClientBuildManagerParameter
    {
        PrecompilationFlags = PrecompilationFlags.ForceDebug
    };
var client = new ClientBuildManager("/", src, dest, parameter);
client.PrecompileApplication();