locked
Build Failing - trying to upgrade to 4.5.1 RRS feed

  • Question

  • I'm trying to bring an entire solution up to 4.5.1 framework.  I've gotten most of the non-website dll's to build on my build server, but only one of the websites is building.  They have the following message for each .dll that I upgraded (which is most of them).  I did update the websites to 4.5.1 using the 'property pages' in the solution explorer, and then checked in the web.config file.  What am I missing or doing wrong?  Thanks for any help at all!

    c:\mileg\tfs\build\MILeg\MILegNightlyReleaseBuild\src\Website.metaproj : warning MSB3274: The primary reference "c:\mileg\tfs\build\MILeg\MILegNightlyReleaseBuild\bin\Mixed Platforms\Release\DB.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.5.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v3.5".


    • Edited by JJQuinn Tuesday, March 3, 2015 5:54 PM
    Tuesday, March 3, 2015 5:53 PM

Answers

All replies

  • If I read the tip from my build log below, I guess my questions is, keeping in mind that I can't remove the reference, I need to retarget my application to a framework version which contains... blah blah blah.  Doesn't changing the reference using the webpages and pointing to the 4.5.1 target framework and then checking in the file web.config do that for me?

    "To resolve this problem, either remove the reference "c:\mileg\tfs\build\MILeg\MILegNightlyReleaseBuild\bin\Mixed Platforms\Release\SearchEngineServices.dll" or retarget your application to a framework version which contains "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    Tuesday, March 3, 2015 6:16 PM
  • Hi JJQuinn,  

    Thanks for your post.

    What’s the version of your TFS and VS?

    After changed the target framework in your solution, can you build your solution successfully using VS on your client? If yes please log on your build agent machine, and copy your solution to build agent machine, then manually build your solution using VS on build agent machine, ensure can build successfully too.

    If you cannot build your solution using VS manually after changed the target framework solution, I think this issuer relate to your solution or you cannot change the target framework correctly in your solution’s projects, please contact ASP.NET experts to resolve this issue in your website solution first. Once you can manually build your solution using VS, try build it using Team Build again, I think Team Build will build it successfully too. 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 4, 2015 8:07 AM
    Moderator
  • Hi JJQuinn, 

    If there’s anything misunderstood, please describe your question in more detail and we will try to provide the better responses.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, March 5, 2015 9:22 AM
    Moderator
  • Yes - my question is I have the following showing up in the build logs...

    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_compiler.exe -v /LITWebServices -p LITWebServices\ -u -f "c:\mileg\tfs\build\MILeg\MILegNightlyReleaseBuild\bin\Mixed Platforms\Release\_PublishedWebsites\LITWebServices\\" 
    That v2.0.50727 seems wrong!

    I think this needs to invoke the aspnet_compiler from the 4.0 folder.  How can I get the build to do that?

    Friday, March 6, 2015 6:41 PM
  • Hi JJQuinn,

    Thanks for your reply.

    How did you configure to invoke aspnet_compiler in your web application? Please refer to the discussion in this post: https://social.msdn.microsoft.com/Forums/vstudio/en-US/ca8b641b-9944-4c11-87f7-ccfe7883177f/aspnetcompiler?forum=tfsbuild.    

    Logon your build agent machine, and manually execute MSBuild command line to build your web application on build agent machine, what’s the result? Received the same MSBuild error? If yes, please tracking the replies in your MSBuild post: https://social.msdn.microsoft.com/Forums/vstudio/en-US/86490840-24d9-4cda-989e-33852d78d0e6/errors-running-msbuild-after-targeting-the-451-framework-websites-not-building?forum=msbuild#86490840-24d9-4cda-989e-33852d78d0e6.    


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 9, 2015 8:53 AM
    Moderator
  • John,

      I want to thank you from the bottom of my heart for sticking with this thread, and making suggestions even when I was not making a lot of sense.  Knowing there was one person out there trying to help me kept me trying the things you suggested, and those things spurred new ideas.  It turned out to be the TargetFrameworkMoniker tag at the top of the solution file that was set to 3.5.  When I changed that to 4.5.1 it built.  But I would not have kept trying other things if you hadn't encouraged me.  THANKS!

    Jenny Quinn

    Monday, March 9, 2015 6:19 PM
  • Hi Jenny? 

    Thanks for your reply.

    Have you tried manually build your solution using MSBuild command on build agent machine? You need find out this issue relate to the configurations in your solution itself or relate to TFS Build first.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 10, 2015 2:26 AM
    Moderator