none
Visual Studio does not detect .NET Framework 4.5 RRS feed

  • Question

  • I get this error message in VS2013pro when trying to load an ASP.net web site :

    Error Message when opening the web site

    It is mind boggling. The error message is not logical (change... to 4.5... you can change back to ... 4.5..).

    I tried a few things. First, to download 4.5 anew but as soon as I launched the installer, I got a message that 4.5 was already installed on my system?

    This web site was created more than a year ago and I must have updated to 4.5 by now, to work on other projects. I suppose it was created in 4.0?

    Still, when I run the web site, under Edge, there are no issues I can can see.

    But when I try to make edits to the code, in Design view, I get error messages, such as :

    Error Creating Control - asp:hyperlink Failed to create designer 'System.Web.UI.WebControls.HyperLink, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

    And :

    Error Creating Control - ScriptManager1 Failed to create designer 'System.Web.UI.ScriptManager, System.WebExtensions, Version-4.0.0.0, Culture-...

    And :

    Error Creating Control - UpdatePanel1 .... Version 4.0.0.0

    --

    I ran the 'netfx_setupverifier.exe' which reported that .NET 4.0, 4.5, 4.5.1, 4.6, 4.6.1 were all installed on my system with no issues detected.

    I ran the NetFxRepairTool.exe and the issues detected (minor) were fixed. It invited me to attempt reinstalling 4.5.

    But as soon as the 4.5 installer ran, it immediately reported 4.5 was already installed. (Can't fool this one)

    Could be my Registry is broken but I suspect I need to "update" all References in my Project to 4.5?


    • Edited by roger.breton Thursday, September 29, 2016 6:40 PM
    Thursday, September 29, 2016 6:35 PM

Answers

  • After much trepidation and research, Ii found that the Target Framework menu was greyed out :

    Target Framework

    I felt confident, at that point to select 4.5.1.

    This "solved" one problem. But it was a pain to unearth this issue :(

    • Marked as answer by roger.breton Thursday, September 29, 2016 8:47 PM
    Thursday, September 29, 2016 8:47 PM

All replies

  • I thought I'd add this screen capture which shows what happen when I pull down the :

    WebSite > Add Reference > Assemblies > Framework menu item in VS2013pro

    Screen capture

    If no .NET Framework Assemblies are showing here, it could the sign that something is wrong?

    Thursday, September 29, 2016 6:49 PM
  • This is the content of Web.Config :

    <?xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <system.web>
        <compilation strict="false" explicit="true" targetFramework="4.0" debug="true">
          <assemblies>
            <add assembly="WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </assemblies>
        </compilation>
        <customErrors mode="Off"/>
      </system.web>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>

    Thursday, September 29, 2016 6:56 PM
  • Had to try the "obvious", attempt to create a fresh, new web site. This is what I get when navigating

    WebSite > Add Reference > Assemblies > Framework menu item :

    Screen capture

    So it looks like 4.5.1 is now the 'default' Framework version in my installation of VS2013.

    Thursday, September 29, 2016 7:01 PM
  • After much trepidation and research, Ii found that the Target Framework menu was greyed out :

    Target Framework

    I felt confident, at that point to select 4.5.1.

    This "solved" one problem. But it was a pain to unearth this issue :(

    • Marked as answer by roger.breton Thursday, September 29, 2016 8:47 PM
    Thursday, September 29, 2016 8:47 PM