简体   繁体   中英

How to change .NET Framework in Rider IDE?

In Rider IDE, I am trying to create a new solution:

在此处输入图片说明

But I'm unable to change the .NET Framework as the dropdown is disabled. How can I change the version? I have installed .NET Framework 3.5, 4.5, 4.6.

This is one of the way to change the build framework in Rider. It allows you to switch the MSBuild version explicitly by selecting MSBuild.dll.

When you have multiple .NET framework, you can change it here.

This example is for .NET core project.

在设置中

In my system I installed latest .NET core RC after which Rider started complaining in older projects (when there were working fine prior to installation)

I had following versions

在此处输入图片说明

I selected the older version of MSBuild.dll and my project were back to normal.

Actually for now Rider contains the only one Web App Template - for net45. We are going to add another one - for net4.6.1 (or 4.6.2) in 2018.1. You can track status here: https://youtrack.jetbrains.com/issue/RIDER-10888

The main issue here - we can not just change target framework version, but change all referenced package versions and some template files...

  • in Rider IDE in solution explorer - right mouse click on the project,
  • in properties (left pane) select Application (should be selected by default)
  • in the right - change Target framework - click on ellipses, check your new framework
  • Save

@FaizanRabbani You should have installed suitable .NET Developer Pack to change this option. You can download it from https://www.microsoft.com/net/download/windows

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM