In Visual Studio you have many project templates.
Is it possible to set the initial PropertyGroup
properties in a csproj
file when a new project is created?
When I create a new console application, for example, these are the contents of its csproj
file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
If I wanted the contents of the csproj
file to be different for console applications I create, how can I do that?
For instance, I want all my console application projects to have Nullable
disabled by default.