MSBuild - 由于dll伪造而构建错误

时间:2013-08-07 10:01:44

标签: microsoft-fakes

配置: Visual Studio 2012 Premium + Update 2

您好, 我的unitTest项目使用两个Fake程序集。 其中一个组件产生构建错误,我真的不知道为什么。 如果我取下这个程序集,编译就可以了。 错误是“结果:发生意外异常(-1002 - 0xfffffc16)”

我看到其他一些帖子有相同的错误,但这是因为Moles汇编。 有人有解决方案来解决这个问题吗?

以下是构建结果的一部分:

.fakes Fakes\Technical.Sdk.fakes will generate ...\Workflow.UnitTests\FakesAssemblies\Technical.Sdk.Fakes.dll
  verbosity: Warning
  x86: False
  framework version: v4.5
  target runtime version: v4.0.30319
  ReferenceFiles: 78
    ...\packages\AutoMapper.3.0.0-ci1037\lib\net40\AutoMapper.dll
    ...\packages\AutoMapper.3.0.0-ci1037\lib\net40\AutoMapper.Net4.dll
    ...\Lib\Directory.Proxy.dll
    ...\Lib\Platform.Common.dll
    ...\Lib\Platform.Interfaces.dll
    ...\bin\Release\Technical.EntityFramework.dll
    ...\bin\Release\Technical.Sdk.dll
    ...\bin\Release\Technical.ServiceBus.dll
    D:\371\BuildType\..\src\Main\Source\bin\Release\Microsoft.Practices.Prism.dll
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\Microsoft.QualityTools.Testing.Fakes.dll
    ...\Lib\Microsoft\Microsoft.ServiceBus.dll
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
    ...\Lib\Moq\Moq.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
    ...\Lib\AutoFixture\Ploeh.AutoFixture.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll
    ...\bin\Release\WFCommon.Context.dll
    ...\bin\Release\WFCommon.DataTransferObjects.dll
    ...\bin\Release\WFCommon.LoggingExceptions.dll
    ...\bin\Release\WFCommon.ServiceBusContract.dll
    ...\bin\Release\Workflow.Bll.dll
    ...\Workflow.UnitTests\FakesAssemblies\Workflow.Bll.Fakes.dll
    ...\bin\Release\Workflow.BusinessObjects.dll
    ...\bin\Release\Workflow.Dal.dll
    ...\bin\Release\Workflow.ServerContext.dll
    ...\bin\Release\Workflow.ServiceBus.dll
    ...\bin\Release\EntityFramework.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Entity.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll
    ...\bin\Release\Sdk.dll
    ...\bin\Release\PresentationCore.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\WindowsBase.dll
    ...\bin\Release\Sdk.Media.dll
    ...\bin\Release\RestSharp.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Runtime.Serialization.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.ServiceModel.dll
    ...\bin\Release\Microsoft.Practices.TransientFaultHandling.Core.dll
    ...\bin\Release\Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.dll
    ...\bin\Release\...Technical.Util.dll
    ...\bin\Release\PresentationFramework.dll
    ...\bin\Release\Microsoft.Practices.EnterpriseLibrary.Logging.dll
    ...\bin\Release\Microsoft.Practices.Composite.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Drawing.dll
    ...\bin\Release\EFTracingProvider.dll
    ...\bin\Release\EFProviderWrapperToolkit.dll
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll
    C:\Program Files (x86)\Reference 
...
Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.EnterpriseServices.dll
    ...\bin\Release\Microsoft.Practices.Unity.dll
  framework assembly path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies
  output path: ...\Workflow.UnitTests\FakesAssemblies
  intermediate path: ...\Workflow.UnitTests\obj\Release\Fakes



Fakes: 2 (2 .fakes files)
    Fakes\Workflow.Bll.fakes
    Fakes\Technical.Sdk.fakes
  fakes tool: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Fakes\fakes.x86.exe
  result: unexpected exception occured (-1002 - 0xfffffc16)
  Fakes assemblies:
    ...\Workflow.UnitTests\FakesAssemblies\Workflow.Bll.Fakes.dll
    ...\Workflow.UnitTests\FakesAssemblies\Workflow.Bll.Fakes.fakesconfig
Done Building Project "...\Workflow.UnitTests\Workflow.UnitTests.csproj" (default targets) -- FAILED.

感谢。

1 个答案:

答案 0 :(得分:2)

这表示Fakes代码生成器未准备好正常处理的问题。要对其进行故障排除,请通过在.FAKES文件的Fakes元素中设置Verbosity =“Noisy”来增加日志记录详细程度。这将使Fakes代码生成器向MSBuild日志写入更多信息,并希望帮助您识别问题。确保在Visual Studio选项或命令行中将MSBuild日志详细程度设置为“详细”或“诊断”级别,因为Fakes不会以较低的详细级别将诊断信息写入MSBuild日志。

如果可以将问题缩小到小型repro项目,我建议您在http://connect.microsoft.com/visualstudio提交。