2014-07-16 2 views
2

TestWindow 폴더 (C : \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow)를 Visual Studio가 설치되어 있지 않고 x64 cpp 테스트 dll에서 vstest.console.exe 명령을 실행 해 보았습니다.Visual Studio를 설치하지 않고 vstest.console.exe를 사용하여 C++ unittest 실행

vstest.console.exe tests.dll /tests:testmethod1 /platform:x64 /logger:console 

이것은 이벤트 로그에 표시되는 오류입니다.

 
Application: vstest.discoveryengine.exe 
Framework Version: v4.0.30319 
Description: The process was terminated due to an unhandled exception. 
Exception Info: System.IO.FileNotFoundException 
Stack: 
    at Microsoft.VisualStudio.TestPlatform.TestRunnerService.DataCollectors.DataCollectionPluginManager..ctor() 
    at Microsoft.VisualStudio.TestPlatform.TestRunnerService.WcfTestRunnerService..ctor(System.Threading.ManualResetEvent) 
    at Microsoft.VisualStudio.TestPlatform.TestRunnerService.TestRunnerServiceHost.CreateServiceHost(System.String, System.Threading.ManualResetEvent) 
    at Microsoft.VisualStudio.TestPlatform.TestRunnerService.ServiceMain.Main(System.String[]) 

답변

2

FileNotFoundException은 필요한 일부 어셈블리가 누락 되었기 때문입니다. WinDbg를 사용하여 이들을 발견하고 TestWindow 폴더로 복사했습니다.

- Microsoft.VisualStudio.Diagnostics.Measurement.dll 
- Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll 
- Microsoft.VisualStudio.QualityTools.Common.dll 
- Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll 
- Microsoft.VisualStudio.QualityTools.Resource.dll 
- Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 

이 어셈블리는 Visual Studio가 설치된 컴퓨터에서 C:\windows\assembly\GAC_MSIL에 있습니다.

vstest.console 명령에서 /tests 스위치를 제거하면 추가 dll이 필요하지 않은 것으로 나타났습니다.

는 또한 TestWindow 폴더 상기 GAC 어셈블리 데 더하여

- C:\Windows\System32\msvcr120.dll 
- C:\Windows\System32\msvcp120.dll 
0

을 (대상 컴퓨터 ++ 런타임 비주얼 C가없는 곳의 경우를 고려하기 위해)을 TestWindow 폴더 다음 DLL을 복사 (Visual Studio의 버전과 일치하는 GAC 어셈블리 버전이 있는지 확인하십시오.) 그리고 필요한 경우 VSC++ 어셈블리도 최신 버전의 .NET Framework가 설치되었는지 확인해야했습니다. VS 2012 vstest.console.exe로 작업하고 있었고 .NET Framework 4.5.2 Windows Update를 설치하면 도움말 메뉴를 실행할 수있었습니다.

0

간단한 해결책을 찾았습니다. Visual Studio Agents을 서버에 설치하기 만하면됩니다.

(이 경우 TestWindow 폴더를 복사하거나 지나갈 필요가 없습니다.)

관련 문제