0

I have an ASP.NET Web App which I want to build and run using .NET 4.7.1 (it used to run using .NET 4.5 or I believe so).

I have updated the Target Framework of the project to .NET Framework 4.7.1 as well as reinstalled all the NuGet dependencies using this command: Update-Package -reinstall

My packages.config now says for all the packages this: targetFramework="net471"

After building my solution, I went and opened one of the DLLs of my Web App using ILSpy and I found this:

Version=1.0.0.0, Culture=neutral, PublicKeyToken=null // Global type: // Architecture: AnyCPU (64-bit preferred) // Runtime: v4.0.30319

But at the same time, the assembly says this:

[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]

I am obviously missing something but I have no clue what it is. From this information, it seems I am still running on .NET 4.5 but I don't know why.

My Visual Studio version is 2017

Thanks!

user3587624
  • 1,427
  • 5
  • 29
  • 60
  • 1
    "*From this information, it seems I am still running on .NET 4.5 but I don't know why*" why does it seem that? from this information it seems that you are not – TheGeneral Feb 06 '19 at 00:13
  • Am I not? I guess what is confusing me is the fact that the Runtime says v4.0.30319 – user3587624 Feb 06 '19 at 00:15
  • 1
    The CLR version and the framework version are 2 different things, more info here https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies – TheGeneral Feb 06 '19 at 00:17
  • I see... so I guess all the subversions of .NET 4.X will have same CLR version, correct? – user3587624 Feb 06 '19 at 00:20
  • 1
    I don't have time to answer this fully, however maybe someone else can fill in the blanks and scope out a formal answer to OP – TheGeneral Feb 06 '19 at 00:26

0 Answers0