FinalBuilder: 8.0.2268
Windows: Windows 10 Enterprise, 64 bit
Third party tools: Visual Studio 2017 version 15.3.3, .NET Framework version 4.7.02053, MSBuild 15
I’m building a new Build PC and I’ve got it to the point where I can successfully build the solution both in Visual Studio and from the command line but when I run the FinalBuilder script I get " The type or namespace name ‘VisualStudio’ does not exist in the namespace ‘Microsoft’".
After doing some Googling I installed the Visual Studio SDK but it made not difference.
The script ran successfully on our old Build PC which was Windows 8 and Visual Studio 2015 with MSBuild 14 so I’m assuming it something to do with the setup of FinalBuilder on the new machine.
Any thoughts?
Can you show the full error?
Also, did you restart FinalBuilder after installing the SDK?
If possible, send your csproj file to support @ finalbuilder.com so we can try to reproduce the problem here.
It would be useful also to see what settings you have on your vs action.
Hi Vincent,
I restarted the whole PC after installing everything.
The whole error is: "Errors : Test\TransRollbackTestBase.cs(2,17): error CS0234: The type or namespace name ‘VisualStudio’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)"
It’s something to do with Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll which is definitely there on the machine, in C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ReferenceAssemblies\v4.0 among other places.
By the VS action do you mean the Build step in the script? I’ve attached an image of the MS Build tab.
I’ll send you the csproj file if we can’t diagnose anything else but as I say, it works fine on the old Build PC.
Hi Ozpom,
Without seeing the solution your building, my guess is that its referencing Visual Studio 2015 binaries. From what you have said the current machine only has Visual Studio 2017 installed.
The reason the solution will build correctly in Visual Studio 2017 is that it loads its binaries so they are already present when the build process goes looking for them. When using MSBuild it has to search for the binaries and does not find the version specified.
I suggest either re-adding the affect binaries to the solution so that you get references to the Visual Studio 2017 binaries, or install Visual Studio 2015 on the new machine. If you update the project note that your build server will most likely fail with the update and will need Visual Studio 2015 installed.
Yes, it was the way that the binaries were added to the solution that was the problem - various different projects referenced different versions in different place and some has Specific Version set to true. I removed all those references and added the Microsoft.VisualStudio.QualityTools.UnitTestFramework NuGet package instead and it’s all fixed. It’s still strange, though, that MSBuild run from the command line had no problems building.
Thanks for your responses, now I just need to get the Delphi scripts working :-]
P.S.: Not being able to see the post I’m replying to when I’m typing my reply on here makes thing kind of difficult.
Hi Craig
Glad to hear you got it sorted.
With regards to seeing the topic while replying, if you use the quick reply option then thats not and issue. When using the Add reply button, there is a Topic Review section below the editor, which is collapsed by default, click on the + to see the thread.