2013-08-07 50 views
1

配置: 的Visual Studio 2012高級版+更新2的MSBuild - 建立自己的錯誤,因爲DLL假貨

嗨, 我的單元測試項目使用了兩個假的組件。 其中一個組件產生一個構建錯誤,我真的不知道爲什麼。 如果我脫下這個程序集,編譯就OK。 錯誤是「結果:意外的異常發生(-1002 - 0xfffffc16)」

我已經看到一些其他職位有相同的錯誤,但它是因爲鼴鼠大會。 有人有解決方案來解決這個問題?

這是構建結果的一部分:

.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. 

感謝。

回答

2

這表示僞造代碼生成器未準備妥善處理的問題。要排除故障,通過在.FAKES文件的Fakes元素中設置Verbosity =「Noisy」來增加日誌詳細程度。這將使Fakes代碼生成器向MSBuild日誌寫入更多信息,並希望能夠幫助您識別問題。確保MSBuild日誌詳細程度在Visual Studio選項或命令行中設置爲「詳細」或「診斷」級別,因爲Fakes不會將診斷信息寫入較低級別的MSBuild日誌中。

如果可以將問題縮小到小型repro項目,我鼓勵您在http://connect.microsoft.com/visualstudio提交它。

相關問題