VS 2017 ASP.Net Core Web Application cannot target .Net Framework

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



VS 2017 ASP.Net Core Web Application cannot target .Net Framework



I seem to have lost the ability to create an ASP.Net Core Web Application that targets the .Net Framework. The dropdown is disabled where it used to be enabled.



enter image description here



I have .Net 471, 472 SDKs and targeting packs installed and my VS2017 is updated to 15.7.6.



I've tried uninstalling/reinstalling the .Net 4.7x SDKs and targeting packs but that didn't help.



Is there something short of reinstalling Visual Studio from scratch that I can do?




2 Answers
2



The project template only supports .NET Core. However, once you create the project, you can edit your .csproj and change:


.csproj


<TargetFramework>netcoreapp2.1</TargetFramework>



To:


<TargetFramework>net472</TargetFramework>



Save, and you're good to go.





Thanks. I was just about to fix that. Forgot the 4 because I'm not caffienated enough yet.
– Chris Pratt
Aug 7 at 14:47


4





caffeinated enough to answer it faster than me... [shakes fist] :-).
– vcsjones
Aug 7 at 14:53





The ASP.NET Core team goes back and forth on it. They've removed and added back full framework support multiple times. I think the idea is that they're trying to nudge you away from that path by not presenting it as an option in the GUI. Frankly, there's very little reason at this point to actually use the full framework unless you're dealing with lots of Windows-specific APIs. With .NET Standard 2.0, you can utilize virtually any full framework library in your project targeting .NET Core 2.0+.
– Chris Pratt
Aug 7 at 15:13





That's actually the wrong approach. You should target .NET Core until you cannot, not start with .NET Framework. It's not just about being cross-platform; running on .NET Core takes out a ton of headaches associated with using and maintaining the full framework.
– Chris Pratt
Aug 7 at 15:25





I agree. However when you're trying to convince a large corporate IT developer community to move to Core, telling them they can still target .Net framework was a carrot....
– Jim
Aug 7 at 15:28




It would appear that there are two templates now that can create an ASP.Net Core Web Application.



Under .Net Core



enter image description here



And under Web



enter image description here



To get the option of selecting to target .Net Core or .Net Framework, you must use the template under Web.



enter image description here






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered