Having troubles building my solution with MSBuild on Bamboo
Having troubles building my solution with MSBuild on Bamboo
I have a windows application developed in Visual Studio 2015 professional, Framework - 4.6.1 .I have written unit test cases for this windows service using MStest. If I build this application locally on my machine, the build is successful (build is done by Visual Studio -> Build-> Build Solution and through MSBuild).
Now I have a VM where visual studio 2015 is not installed.But has VS2017 installed on it. Now I'm trying to build my application by MSBuild through Bamboo. It gives the following errors on it .
UnitTest1.cs(2,17): error CS0234: The type or namespace
name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you
missing an assembly reference?)
[C:UsersAdministratorbamboo-homexml-databuild-dirGUI-DEV-JOB1UnitTestGUIUnitTestGUI.csproj]
UnitTest1.cs(9,10): error CS0246: The type or namespace
name 'TestMethod' could not be found (are you missing a using directive
or an assembly reference?)
[C:UsersAdministratorbamboo-homexml-databuild-dirGUI-DEV-JOB1UnitTestGUIUnitTestGUI.csproj]
UnitTest1.cs(9,10): error CS0246: The type or namespace
name 'TestMethodAttribute' could not be found (are you missing a using
directive or an assembly reference?)
[C:UsersAdministratorbamboo-homexml-databuild-dirGUI-DEV-JOB1UnitTestGUIUnitTestGUI.csproj]
UnitTest1.cs(6,6): error CS0246: The type or namespace
name 'TestClass' could not be found (are you missing a using directive
or an assembly reference?)
[C:UsersAdministratorbamboo-homexml-databuild-dirGUI-DEV-JOB1UnitTestGUIUnitTestGUI.csproj]
UnitTest1.cs(6,6): error CS0246: The type or namespace
name 'TestClassAttribute' could not be found (are you missing a using
directive or an assembly reference?)
[C:UsersAdministratorbamboo-homexml-databuild-dirGUI-DEV-JOB1UnitTestGUIUnitTestGUI.csproj]
The errors are quite confusing because I have referenced to Microsoft.VisualStudio.QualityTools.UnitTestFramework, but still showing these error.
Microsoft.VisualStudio.QualityTools.UnitTestFramework
The reason for these errors which I feel is as follows (which can be completely wrong).
There is no Visual Studio 2015 on my build environment which is causing this problem. or
When I look at the properties for this particular reference in my code, the path for this is displayed as "C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDEPublicAssembliesMicrosoft.VisualStudio.QualityTools.UnitTestFramework.dll". But there is no folder with name Microsoft Visual Studio 14.0 in my VM where I'm building the code. How do I get this. Is it by installing Visual Studio 2015?
C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDEPublicAssembliesMicrosoft.VisualStudio.QualityTools.UnitTestFramework.dll
Microsoft Visual Studio 14.0
Can anyone help me in solving this as I'm stuck here.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.