Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7820381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:16:04+00:00 2026-06-02T07:16:04+00:00

I’m currently slugging it out with TeamCity trying to get two build configuration working

  • 0

I’m currently slugging it out with TeamCity trying to get two build configuration working for an ASP.NET MVC 3 solution. My setup is pretty much identical to the guidance at http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity_26.html . When it builds the .sln in the first “Build & Test” build configuration, everything works great. But in the “Package & Deploy” configuration, when I’m having MSBuild build the MyWebProject.csproj file directly, it seems to be resolving core .NET references to .NET 3.5 assemblies, and not .NET 4.0 assemblies.

Accordingly, I’m getting all kinds of .NET 3.5 compilation errors, such as “{ get; set; }” properies needing bodies since they’re not marked as abstract.

Additionally, what makes me think that it’s picking up v3.5 assemblies, is that during the TeamCity CoreCompile – Csc build activity, it says

“[Csc] c:\Program
Files\TeamCity\buildAgent\work\651adc4c97432014\packages\DataAnnotationsExtensions.1.0.2.0\lib\NETFramework40\DataAnnotationsExtensions.dll
error CS1705: Assembly ‘DataAnnotationsExtensions, Version=1.0.2.0,
Culture=neutral, PublicKeyToken=358a5681c50fd84c’ uses
‘System.ComponentModel.DataAnnotations, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35’ which has a higher
version than referenced assembly
‘System.ComponentModel.DataAnnotations, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35′”

Now if I explicitly set the version to “Version=4.0.0.0” in the web project’s .csproj file, then it starts giving me similar exceptions on other core .NET assemblies, such as System.Core.dll; i.e., it keeps trying to resolve references to v3.5 assemblies instead of v4.0. Interestingly, I know it’s using the MSBuild for v4.0, because the build log states “Using user-defined MSBuild from: C:\Windows\Microsoft.NET\Framework\v4.0.30319.” My command line parameters, begin passed to the MSBuild configuration, is as follows:

/P:Configuration=%env.Configuration%
/P:DeployOnBuild=True
/P:DeployTarget=MSDeployPublish
/P:MsDeployServiceUrl=https://%env.TargetServer%/MsDeploy.axd
/P:AllowUntrustedCertificate=True
/P:MSDeployPublishMethod=WMSvc
/P:CreatePackageOnPublish=True
/P:UserName=MyUsername
/P:Password=MyPassword

I’ve done the following on the build server:
* Installed “Microsoft Windows SDK for Windows 7 and .NET Framework 4”
* Installed VS 2010 (was hoping to avoid this)
* Installed ASP.NET MVC 3
* Added the evn.MSBuild set to %system.DotNetFramework4.0_x86_Path%.
* Added the registry key HKLM/SOFTWARE/Microsoft/.NETFramework/SDKInstallRootv2.0 to be “C:\Program Files\Microsoft SDKs\Windows\v7.1.”

Thanks for any help you can provide!

Billy McCafferty

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:16:06+00:00Added an answer on June 2, 2026 at 7:16 am

    What you gotta do is make sure a few things are set when you are building the project…

    I typically break it into two steps

    1) build the solution
    In this step make sure the visual studio version is set to 2010.

    enter image description here

    2) Prebuild Web
    In this step I invoke commands to build the web project and generate the deployable, set the framework version for the msbuild step and appropriate and platform. Set the targets to “ResolveReferences;_CopyWebApplication” The build file path should be pointed to the csproj file for the mvc application

    enter image description here

    The last required step is to set a few build parameters.

    system.Configuration => Release
    system.OutputPath => C:\inetpub\wwwroot\foo\bin
    system.WebProjectOutputDir => C:\inetpub\wwwroot\foo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.