none
.net 4.5 framework install issue with VS2010 / web.config / app pools RRS feed

  • General discussion

  • Here is the install which works and compiles great prior to .net 4.5 framework install.

    .net 4.0 framework installed, ASP.NET web site which is targeting .net 3.5 in the build preferences and has all the "start up" and "legacy" entries in the web.config as well as in IIS runs in the .net 2.0 classic app pool. When build is initialed it builds fine since it is not compiled against .net 4.0 compiler which we all know is much stricter. Again it compiles with no issues.

    Enter .net 4.5 framework install (with no changes what so ever done to the project) is fails to compile since it tries to compile against .net 4.0 and up. All the web.config entries are there the app pool is again set to .net 2.0 classic and it still compiles for .net 4.0. I know because the errors I get are identical of those I was getting when I set the app pool to work on .net 4.0 prior the .net 4.5 install.

    So how can I force the VS2010 and the compiler to target .net 3.5 and not .net 4.0 when I have all the web.config suggested by MS entries as well as the app pool is set to 2.0?

    Thanks in advance.

    PS. What I mean by web.config legacy & startup:

      <startup useLegacyV2RuntimeActivationPolicy="true">
       
    <supportedRuntime version="v3.5.30729.1"/>
     
    </startup>

    I have the compiler section as well:

    <compilers>
       
    <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=3.5.30729.1, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
         
    <providerOption name="CompilerVersion" value="v3.5"/>
         
    <providerOption name="OptionInfer" value="true"/>
         
    <providerOption name="WarnAsError" value="false"/>
     
    </compiler>
    Monday, October 8, 2012 1:25 PM

All replies

  • Hi,

    Welcome to the MSDN forum

    I'm doing some research on this issue, I will back as soon as possible.

    Regards,


    Barry Wang [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, October 9, 2012 10:19 AM
    Moderator
  • Hi The_Akrion,

    I would like to know why you install .NET 4.5? And after you installed .NET 4.5, does the web site target changed in project property?

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, October 10, 2012 5:22 AM
    Moderator
  • Hi The_Akiron,

    I would like to understand this better. Could you send me small project with the repro code that works correctly on VS2010 and .NET4.0 to netfx45compat at Microsoft dot com?

    Thanks

    --Varun

    .NET Framework Compatibility Team


    Varun Gupta - MSFT


    Saturday, October 13, 2012 5:49 PM
  • We are changing the issue type to “Comment” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Friday, October 26, 2012 2:40 AM
    Moderator
  • This is unrelated to .NET Framework 4.5.

    Your app.config entry should be <supportedRuntimeversion="v2.0.50727"/>

    For example,

    <?xml version="1.0" encoding="utf-8" ?>

    <configuration>

        <startup useLegacyV2RuntimeActivationPolicy="true">

            <supportedRuntime version="v2.0.50727"/>

        </startup>

    </configuration>


    Varun Gupta - MSFT

    Friday, October 26, 2012 3:32 AM