NOT A DUPLICATE / NOT ANSWERED IN OTHER THREADS None of the indicated duplicates are the problem I'm having since I already have 4.7.2 installed on the server.
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:\windows\microsoft.net\framework64\v4.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: The error page (when running under localhost) is reporting this version information: Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0
Edit 2: I downgraded all the solutions in my project to version 4.7, and that seems to have resolved the issue. I don't know why since the server gives every indication that it's got 4.7.2 installed.