0
votes

I have a TFS 2013 Server with a Build Controller and Agent. Created a new asp.net mvc project and a test project (MSTest) in Visual Studio 2013. Once checked in I have then attempted to do a TFS Build however

I am greeted with errors such as: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) the same for 'TestClassAttribute' and 'TestClass' etc.

I am also getting loads of warnings such as:

C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (991): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

With the final error of:

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I have searched around to find an answer various people suggesting installation of Visual Studio on the build server (an option that is not possible) and many saying changing build arguments with /p:VisualStudioVersion=12.0 and deleting things out of the csproj.

I have managed to get a build to work however I had do explicitly set the configuration to Release|x86, yet I get a drop folder zip which is empty.

Any ideas on how to resolve these issues without resorting to installing Visual Studio?

1
Why is it "not possible" to install Visual Studio on the build server? That is the recommended approach.Daniel Mann
So, to get the build server to work correctly, I need to buy an additional visual studio licence per build server?bannypotter
@Daniel, can you point me to the official Microsoft recommended approach?bannypotter
No, you don't need additional licenses for the build server. The licensing whitepaper spells it out: microsoft.com/en-us/download/details.aspx?id=13350Daniel Mann
Relavent section: "If you have one or more licensed users of Visual Studio Ultimate with MSDN, Visual Studio Premium with MSDN, or Visual Studio Professional with MSDN, then you may also install the Visual Studio software as part of Team Foundation Server 2013 Build Services. This way, you do not need to purchase a Visual Studio license to cover the running of Visual Studio on the build server for each person whose actions initiate a build."Daniel Mann

1 Answers

0
votes

You need to install Visual Studio on the build server. This does not require a licence and you can install the highest version of VS that you are licensed for under MSDN. So if your org has even one VS Ultimate/Enterprise the. You can bung that on any build server .