Share via

how to know what version of the .net Framework is used in visual studio 2017 and subsequently change the version to the latest one.

立祥 陳 1 Reputation point
2022-12-08T00:22:38.293+00:00

We have an existing program in a directory that is not a project in visual studio 2017. We set it up in IIS as a website. In visual studio, we open it as a website. We would like to know what version of the .net Framework is currently used in visual studio 2017 and subsequently change the version to the latest one. We know how to do it if the program is a project in Visual studio 2017 and the solution file exists. However, currently our program is not a project in visual studio. It is just a website set up in IIS. We found that the following webpage from Microsoft mentions something about this issue.
https://learn.microsoft.com/en-us/previous-versions/aspnet/bb398791(v=vs.100)#project-differences-when-targeting-a-net-framework-version

However, it does not really tell us how to do it. Can anyone help us on this?

Windows development | Internet Information Services

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 83,816 Reputation points
    2022-12-08T17:49:51.64+00:00

    .net websites are built by IIS .net handler, which calls the aspnet_compiler. two things control the version

    1) in the app pool you pick the major version of the framework, 1,2,3 or 4
    2) as .net framework updates in place (by major version), the version of the framework installed on the server

    with websites, the web.config may have binding statements for nuget packages. It can also replace the version of the .net compiler used (switch to roslyn, which would be included in the bin folder).

    for #2, see:

    https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed

    0 comments No comments

  2. 立祥 陳 1 Reputation point
    2022-12-08T09:49:20.26+00:00

    Yes, there is a web.config file in which no .net framework is set up. Therefore, we do not know which version of the .net framework is currently used and how to change the version of the framework. Thanks a lot.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.