.NET Targeting Error on Server 2016





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I have an app (wcf service) compiled to 4.7.2. All of the projects in the solution target that framework version.



On the server (Windows Server 2016), Framework 4.7.2 is installed (and is reported as ASP.NET Version:4.7.3282.0 in the error page)



The error that's being thrown when I browse to the WCF service:



"The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework."



Here's the indicated error lines from the web config (error is on line 25):



Line 23: </appSettings>

Line 24: <system.web>

Line 25: <compilation targetFramework="4.7.2" />

Line 26: <httpRuntime targetFramework="4.7.2" />

Line 27: <customErrors mode="Off" />



If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds



4.7.2053.0



I tried changing around some app pool settings to no avail. Anyone have some ideas?



Edit: I downgraded all the projects within my solution to version 4.7, and that seems to have resolved the issue. I'm not sure why, since the server gives every indication that 4.7.2 is installed










share|improve this question

























  • Have you tried to add supportedRuntime to the application's app.config file? Windows Server 2016 is based on 1607. 1607 came with .NET 4.6.2 have you confirmed 4.7.2 is installed?

    – Ramhound
    Feb 9 at 0:05













  • If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds 4.7.2053.0

    – Tom
    Feb 10 at 14:15











  • I added supportedRuntime to the web.config. Still get the same error.

    – Tom
    Feb 11 at 14:06











  • If .NET Framework 4.7.2 is actually installed it should be in the list of installed programs. Is that the case?

    – Ramhound
    Feb 12 at 15:58


















1















I have an app (wcf service) compiled to 4.7.2. All of the projects in the solution target that framework version.



On the server (Windows Server 2016), Framework 4.7.2 is installed (and is reported as ASP.NET Version:4.7.3282.0 in the error page)



The error that's being thrown when I browse to the WCF service:



"The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework."



Here's the indicated error lines from the web config (error is on line 25):



Line 23: </appSettings>

Line 24: <system.web>

Line 25: <compilation targetFramework="4.7.2" />

Line 26: <httpRuntime targetFramework="4.7.2" />

Line 27: <customErrors mode="Off" />



If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds



4.7.2053.0



I tried changing around some app pool settings to no avail. Anyone have some ideas?



Edit: I downgraded all the projects within my solution to version 4.7, and that seems to have resolved the issue. I'm not sure why, since the server gives every indication that 4.7.2 is installed










share|improve this question

























  • Have you tried to add supportedRuntime to the application's app.config file? Windows Server 2016 is based on 1607. 1607 came with .NET 4.6.2 have you confirmed 4.7.2 is installed?

    – Ramhound
    Feb 9 at 0:05













  • If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds 4.7.2053.0

    – Tom
    Feb 10 at 14:15











  • I added supportedRuntime to the web.config. Still get the same error.

    – Tom
    Feb 11 at 14:06











  • If .NET Framework 4.7.2 is actually installed it should be in the list of installed programs. Is that the case?

    – Ramhound
    Feb 12 at 15:58














1












1








1


1






I have an app (wcf service) compiled to 4.7.2. All of the projects in the solution target that framework version.



On the server (Windows Server 2016), Framework 4.7.2 is installed (and is reported as ASP.NET Version:4.7.3282.0 in the error page)



The error that's being thrown when I browse to the WCF service:



"The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework."



Here's the indicated error lines from the web config (error is on line 25):



Line 23: </appSettings>

Line 24: <system.web>

Line 25: <compilation targetFramework="4.7.2" />

Line 26: <httpRuntime targetFramework="4.7.2" />

Line 27: <customErrors mode="Off" />



If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds



4.7.2053.0



I tried changing around some app pool settings to no avail. Anyone have some ideas?



Edit: I downgraded all the projects within my solution to version 4.7, and that seems to have resolved the issue. I'm not sure why, since the server gives every indication that 4.7.2 is installed










share|improve this question
















I have an app (wcf service) compiled to 4.7.2. All of the projects in the solution target that framework version.



On the server (Windows Server 2016), Framework 4.7.2 is installed (and is reported as ASP.NET Version:4.7.3282.0 in the error page)



The error that's being thrown when I browse to the WCF service:



"The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework."



Here's the indicated error lines from the web config (error is on line 25):



Line 23: </appSettings>

Line 24: <system.web>

Line 25: <compilation targetFramework="4.7.2" />

Line 26: <httpRuntime targetFramework="4.7.2" />

Line 27: <customErrors mode="Off" />



If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds



4.7.2053.0



I tried changing around some app pool settings to no avail. Anyone have some ideas?



Edit: I downgraded all the projects within my solution to version 4.7, and that seems to have resolved the issue. I'm not sure why, since the server gives every indication that 4.7.2 is installed







iis .net-framework asp.net wcf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 11 at 18:33







Tom

















asked Feb 8 at 21:11









TomTom

64




64













  • Have you tried to add supportedRuntime to the application's app.config file? Windows Server 2016 is based on 1607. 1607 came with .NET 4.6.2 have you confirmed 4.7.2 is installed?

    – Ramhound
    Feb 9 at 0:05













  • If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds 4.7.2053.0

    – Tom
    Feb 10 at 14:15











  • I added supportedRuntime to the web.config. Still get the same error.

    – Tom
    Feb 11 at 14:06











  • If .NET Framework 4.7.2 is actually installed it should be in the list of installed programs. Is that the case?

    – Ramhound
    Feb 12 at 15:58



















  • Have you tried to add supportedRuntime to the application's app.config file? Windows Server 2016 is based on 1607. 1607 came with .NET 4.6.2 have you confirmed 4.7.2 is installed?

    – Ramhound
    Feb 9 at 0:05













  • If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds 4.7.2053.0

    – Tom
    Feb 10 at 14:15











  • I added supportedRuntime to the web.config. Still get the same error.

    – Tom
    Feb 11 at 14:06











  • If .NET Framework 4.7.2 is actually installed it should be in the list of installed programs. Is that the case?

    – Ramhound
    Feb 12 at 15:58

















Have you tried to add supportedRuntime to the application's app.config file? Windows Server 2016 is based on 1607. 1607 came with .NET 4.6.2 have you confirmed 4.7.2 is installed?

– Ramhound
Feb 9 at 0:05







Have you tried to add supportedRuntime to the application's app.config file? Windows Server 2016 is based on 1607. 1607 came with .NET 4.6.2 have you confirmed 4.7.2 is installed?

– Ramhound
Feb 9 at 0:05















If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds 4.7.2053.0

– Tom
Feb 10 at 14:15





If I open a command prompt and go to the c:windowsmicrosoft.netframework64v4.0.30319 directory and run "msbuild -version", it responds 4.7.2053.0

– Tom
Feb 10 at 14:15













I added supportedRuntime to the web.config. Still get the same error.

– Tom
Feb 11 at 14:06





I added supportedRuntime to the web.config. Still get the same error.

– Tom
Feb 11 at 14:06













If .NET Framework 4.7.2 is actually installed it should be in the list of installed programs. Is that the case?

– Ramhound
Feb 12 at 15:58





If .NET Framework 4.7.2 is actually installed it should be in the list of installed programs. Is that the case?

– Ramhound
Feb 12 at 15:58










1 Answer
1






active

oldest

votes


















0














Microsoft, in their infinite versioning wisdom, has deemed that the MS Build version I was seeing (4.7.2053.0) is actually Framework version 4.7. What's more, the version indicated on the error page (4.7.3xxx) is actually the ASP.NET version, which is different than the framework version.



So, despite all indications that I was on version 4.7.2 (to include our server admin saying we were), I was actually on 4.7.



Once we installed version 4.7.2, things worked.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403679%2fnet-targeting-error-on-server-2016%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Microsoft, in their infinite versioning wisdom, has deemed that the MS Build version I was seeing (4.7.2053.0) is actually Framework version 4.7. What's more, the version indicated on the error page (4.7.3xxx) is actually the ASP.NET version, which is different than the framework version.



    So, despite all indications that I was on version 4.7.2 (to include our server admin saying we were), I was actually on 4.7.



    Once we installed version 4.7.2, things worked.






    share|improve this answer




























      0














      Microsoft, in their infinite versioning wisdom, has deemed that the MS Build version I was seeing (4.7.2053.0) is actually Framework version 4.7. What's more, the version indicated on the error page (4.7.3xxx) is actually the ASP.NET version, which is different than the framework version.



      So, despite all indications that I was on version 4.7.2 (to include our server admin saying we were), I was actually on 4.7.



      Once we installed version 4.7.2, things worked.






      share|improve this answer


























        0












        0








        0







        Microsoft, in their infinite versioning wisdom, has deemed that the MS Build version I was seeing (4.7.2053.0) is actually Framework version 4.7. What's more, the version indicated on the error page (4.7.3xxx) is actually the ASP.NET version, which is different than the framework version.



        So, despite all indications that I was on version 4.7.2 (to include our server admin saying we were), I was actually on 4.7.



        Once we installed version 4.7.2, things worked.






        share|improve this answer













        Microsoft, in their infinite versioning wisdom, has deemed that the MS Build version I was seeing (4.7.2053.0) is actually Framework version 4.7. What's more, the version indicated on the error page (4.7.3xxx) is actually the ASP.NET version, which is different than the framework version.



        So, despite all indications that I was on version 4.7.2 (to include our server admin saying we were), I was actually on 4.7.



        Once we installed version 4.7.2, things worked.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 13 at 16:10









        TomTom

        64




        64






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403679%2fnet-targeting-error-on-server-2016%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            Puebla de Zaragoza

            Musa