Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBUILD .NET v4 teamcity

I have installed TeamCity Professional 8.1.3 (build 30101) onto a clean box and I am trying to run a new build. I have copied over the msbuild tools from my local dev machine to the new server and placed them in the x86 folder. I have also installed the IIS web role, .net feature, registered IIS from the cmd line, and installed MSBUILD tools 2013. For some reason, I still am unable to compile anything. I get the following error

SGEN An attempt was made to load an assembly with an incorrect format: C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll.

Is anyone familiar with this error? I am trying to build an app in .NET v4 using msbuild tools v4.

like image 283
cmluciano Avatar asked Jun 26 '14 05:06

cmluciano


People also ask

What is MSBuild in TeamCity?

The MSBuild runner generates an MSBuild script that includes the user's script. This script is used to add TeamCity-provided MSBuild tasks. Your MSBuild script will be included with the <Import> task. If you specified a Visual Studio solution file, it will be called from the <MSBuild> task.

Does MSBuild work with .NET core?

. NET Core applications are typically built using MSBuild or dotnet.exe . MSBuild and dotnet.exe don't require Visual Studio to be installed, but in order to use them, the following prerequisites are required on a build server: Visual Studio Build Tools installed.

How do I use TeamCity with Visual Studio?

Installing Add-inNavigate to the download page of the Visual Studio Add-in: Click the arrow next to your username in the top right corner of the TeamCity web UI and select Profile. In the TeamCity Tools section on the right, click the Visual Studio Add-in download link.


1 Answers

I was getting this error building a project that targeted .NET Framework 4.5.1. I resolved the issue by installing Microsoft .NET Framework 4.5.1 Developer Pack

You can get the SDK (aka Targeting Pack, aks Developer Pack) for other versions you may want to target at .NET SDKs and Downloads

like image 191
Dude0001 Avatar answered Sep 30 '22 06:09

Dude0001