locked
SGEN Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. RRS feed

  • Question

  • User65893105 posted

    I have a problem when trying to build a solution in teamcity.  I get the error above.  I dont get this If I compile in debug mode in VS2010, I DO get it if i compile in Release mode in VS2010.  If I set the 'Generate serialisation assembly' attribute to 'Off' (in the build section of the project)  It will then compile under release mode in VS2010.  So how do i switch this off in the command line in the build step of teamcity ?  I use msbuild and set these command line parameters

    /p:ShouldGenerateSerializer=false
    /p:GenerateSerializationAssemblies=off
    /P:SGenUseProxyTypes=false
    /p:Configuration=Release
    /t:Build
    /p:Platform="Any CPU"

    Ive tried all combinations, but nothing works, it will not compile in teamcity.  I get the same error everytime

    SGEN Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. 

    I also have this in the config files

    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>

    Does anyone have any suggestions/help ?

    Thursday, July 4, 2013 8:51 AM

Answers

  • User-166373564 posted

    Hi misuk

    I use msbuild and set these command line parameters

    Glad to see you again, our configuration and deployment forum deal with relevant issues about deploying asp.net application to IIS, If you have any msdeploy issue, I think our Web Deployment Tool (MS Deploy) forum is more suitable for it,  more professionals will share experience and knowledge with you, you can get more feasible solutions there,

    # MSbuild forum

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=msbuild 

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 9, 2013 10:41 PM