I'm having an issue getting my build server to run my unit test suite. Here's the details:
We're using NUnit 2.6.4
The build server is running TFS Build 2012 with Update 4
The TFS server is running TFS 2013 with Update 2
I have my build controller set up to point to a version controlled folder that has 3rd party dependencies - in this folder are the 4 NUnit dependencies need to run NUnit tests on the build server.
The Test Runner is setup properly to use Visual Studio's test runner
Both Visual Studio 2012 and Visual Studio 2013 with Update 4 are installed on the build server
When I check-in via a gated checkin through my build definition, I get this error:
TF900546: An unexpected error occurred while running the RunTests activity: 'Could not load type 'Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestExecutorLauncher2' from assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.'.
This is the same problem found at:
VS2013, TFS 2012 AutomatedTest NUnit not working problems
I'm using NUnit's latest Test Adapter found at:
https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d
When I decompile this assembly I see that adapter has a dependency on Microsoft.VisualStudio.TestPlatform.ObjectModel version 11.00.
What is interesting here is looking through Client namespace of that class, there is no ITestExecutorLauncher2 which is what the run tests activity is looking for (I think). However, ITestExecutorLauncher2 is found in version 12.00 of Microsoft.VisualStudio.TestPlatform.ObjectModel.
My question is am do I have something misconfigured here or should NUnit.VisualStudio.TestAdapter, Version=2.0.0.0 reference version 12.00 of Microsoft.VisualStudio.TestPlatform.ObjectModel and not version 11.00?
Fyi, I'm using the same Test Adapter in Visual Studio locally and I can run all the tests that way from Test Explorer so it's odd to me.
Thanks for reading
Related
I'm porting an application from VS 2005 to VS 2019. I successfully ported the debug version but faced with issues during release one.
First, when I launch my release app, I got an error "MSVCP80.dll not found". It's strange because debug version successful find the dll in the "C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b"
Second, if I copy MSVCP80.dll and MSVCR80.dll to the release/bin folder I got an error: "R6034 an application has made an attempt to load the c runtime library incorrectly" and "The application was unable to start correctly (0xc0000142)"
So, there the problem? Is any DLL missing in my system? Or it is a build issue? Why debug is Ok bur release is failed?
I have recently created a .Net Core 2 based project on Windows 10 using Visual Studio 2017. I have two class library project, one is for source code and another project is for NUnit test cases of the source code. I built these projects using Visual Studio 2017 and I am able to run test cases using Test Explorer (After installing NUnit Adaptor NuGet package for my test project).
Now, I want to test my source code on Linux so, I am finding a way to execute test cases on Linux. I don't want to build the project on Linux again.
Can anyone please let me know how to run NUnit test cases on Linux?
Can I copy generated DLLs in Linux machine?
Assuming this is a .NET Core test project, you can publish the test project and run the tests on a target system like this:
Run dotnet publish -o ..\tests and copy the contents of the ..\tests project to the target machine.
Run dotnet vstest yourtestproject.dll on the machine to execute the tests.
We have enabled Code Coverage for C# projects in the Nightly Build on the TFS 2012 integrated builds.and see the Code coverage completed successfully, However, we are unable to locate the path of the Code Coverage file on the build server? does anyone where can I find it.
Secondly, in the TFS build, is there variable or an attribute to access the codecoverage result path?
I read through many of the posts on here and never found a clear answer that worked. So after spending the time getting this to work, I figured I should post it.
Problem: The publishing profile would build on the server, but would not publish.
Solution:
Make sure you installed Microsoft Windows SDK and .Net Framework 4
From your client machine with Visual Studio 2012 update 2 installed, copy:
\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\Web\
\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\WebApplications\
To the same location on your server.
Then make a simple batch file:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /v:diag
YOUPROJECT.sln /p:Configuration=Debug /p:DeployOnBuild=true
/p:PublishProfile=YOURPROFILE
This is working for us on multiple build servers.
I hope this helps someone.
It seems insane to me that Microsoft hasn't provided a MSBuild update with all the publishing options. It seems to me that the command line tools are more important on the server....
Just moving Dave's solution into an answer.
Solution:
Make sure you installed Microsoft Windows SDK and .Net Framework 4
From your client machine with Visual Studio 2012 update 2 installed, copy:
\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\Web\
\Program Files(x86)\MSBuild\Microsoft\Visual Studio\v11.0\WebApplications\
To the same location on your server.
Then make a simple batch file:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /v:diag
YOUPROJECT.sln /p:Configuration=Debug /p:DeployOnBuild=true
/p:PublishProfile=YOURPROFILE
This is working for us on multiple build servers.
I have a VS2012 sln which includes an install shield installer project.
If I build the solution/projects manually via solution explorer everything builds fine.
However when using the TFS build definitions i get the following error:
C:\Builds\1\<NAME>\<Build_Definition_Name>\Sources\InstallSetup\InstallSetup.isproj (29): The imported project
"C:\Program Files (x86)\MSBuild\InstallShield\2012SpringLimited\InstallShield.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Can someone please help with this?
Info:
Using VS 2012
OS - Win 7 x64 Pro
You need to install InstallShield on the machine on which you are running the build.
In-case someone is facing the same issue, I was able to solve it by reading what Flexera mentioned on their website: Link
Brief description: in build definition, process tab, make sure the MSBuild Platform is targeting x86.
I too had 64bit Windows (8.1) running and Team Foundation Server 2013 Express.