在构建

时间:2018-06-19 08:57:10

标签: c# unit-testing

使用VS 2017中的C#构建UnitTest项目时遇到问题

我在机器上有以下Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll程序集

C:> dir / s Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll  驱动器C中的卷没有标签。  卷序列号为3DA9-D3C3

C:\ Program Files目录(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow

05/09/2018 11:35 AM 98,864 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                1个文件98,864字节

C:\ Program Files目录(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow \ x64

05/09/2018 11:35 AM 98,864 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                1个文件98,864字节

C:\ Program Files目录(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ Common7 \ IDE \ Extensions \ TestPlatform

05/29/2018 04:22 PM 89,744 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                1个文件89,744字节

C:\ Program Files目录(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ Common7 \ IDE \ PublicAssemblies

05/09/2018 11:35 AM 98,856 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                1个文件98,856字节

C:\ Program Files目录(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ Common7 \ IDE \ ReferenceAssemblies \ v2.0

05/09/2018 11:35 AM 86,848 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                1个文件86,848字节

C:\ Program Files目录(x86)\ Microsoft Visual Studio \ 2017 \ Professional \ Common7 \ IDE \ ReferenceAssemblies \ v4.0

05/09/2018 11:35 AM 98,856 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                1个文件98,856字节

C:\ Users \ IBM_ADMIN.nuget \ packages \ microsoft.visualstudio.qualitytools.unittestframework.updated \ 15.0.26228 \ lib

目录

06/18/2018 05:16 PM Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                0个文件0个字节

目录C:\ Users \ IBM_ADMIN.nuget \ packages \ microsoft.visualstudio.qualitytools.unittestframework.updated \ 15.0.26228 \ lib \ Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

06/13/2017 04:16 PM 98,440 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll                1个文件98,440字节

 Total Files Listed:
           7 File(s)        670,472 bytes
           1 Dir(s)  43,857,920,000 bytes free

错误是:

  Severity  Code    Description Project File    Line    Suppression State
  Error     Error occurred during processing of assembly 'D:\code\tsm\tdp\agents\mmc\Fm.Common\bin_816\Release\Fm.Common.dll': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.   Fm.Common.UnitTests         

  Severity  Code    Description Project File    Line    Suppression State
  Error     The "BuildShadowTask" task failed unexpectedly.
  Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.PublicizeException: Error occurred during processing of assembly 'D:\code\tsm\tdp\agents\mmc\Fm.Common\bin_816\Release\Fm.Common.dll': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter.EmitAttachShadow()
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter..ctor(DynamicType type, ShadowerTargetType targetType)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicType..ctor(DynamicAssembly assembly, TypeBuilder outerType, Type type, TypeCreatorDelegate TypeCreator, ShadowerTargetType targetType)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicAssembly.ShadowType(Type type)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
     --- End of inner exception stack trace ---
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(AppDomain domain, ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
     at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
     at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()   Fm.Common.UnitTests         


  Severity  Code    Description Project File    Line    Suppression State
  Error     The "BuildShadowTask" task failed unexpectedly.
  Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.PublicizeException: Error occurred during processing of assembly 'D:\code\tsm\tdp\agents\mmc\Fm.Common\bin_816\Release\Fm.Common.dll': Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter.EmitAttachShadow()
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicTypeEmitter..ctor(DynamicType type, ShadowerTargetType targetType)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicType..ctor(DynamicAssembly assembly, TypeBuilder outerType, Type type, TypeCreatorDelegate TypeCreator, ShadowerTargetType targetType)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.DynamicAssembly.ShadowType(Type type)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
     --- End of inner exception stack trace ---
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssemblyHelper(ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(AppDomain domain, ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower.ShadowAssembly(ShadowerOptions options)
     at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
     at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
     at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()   Fm.Common.UnitTests         

0 个答案:

没有答案
相关问题