Is there any way to use the new style csproj (with SDK, PackageReferences, and no need to use compile include etc.) by default when creating a new .net framework 4.5.2 project in Visual Studio?
At the moment I'm creating a .net standard project and then changing it to .net 4.5.2, or just manually changing the csproj, but even though this isn't that slow, I would rather it happen automatically obviously.
Old style :
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
...
New Style:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net452</TargetFramework>
...
To add an existing project to a solutionOn the File menu, point to Add, and click Existing Project. In the Add Existing Project dialog box, locate the project you want to add, select the project file, and then click Open. The project is added to the selected solution.
You can create new style .cproj by hand. After that you can export project template (Project->ExportTemplate)
Specify project name, description and set checkbox 'Automatically import the template into Visual Studio'
After that you can use this template in Visual Studio when creating new project
After project template have been created, you can customize them
Customize project and item templates
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With