root:
- .azure:
- pipelines:
- ci.yaml
- pkg.yaml
- cd.json
- src:
- MyLib:
- Dockerfile
- MyLib.csproj
- MyConsoleApp
- MyWebApp:
- Dockerfile
- MyWebApp.csproj
- test:
- MyLib.UnitTests
- MyWebApp.IntegrationTests
- .editorconfig
- .gitignore
- mysolution.sln
- README.md
It should always be at the root folder of the git repository.
Folders should be used to improve visibility (folders in Visual Studio are not real file folders).
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- ONLY for applications! -> Console, Web App, Tests projects -->
<TargetFramework>netcoreapp3.1</TargetFramework>
<!-- For all the other projects = libraries projects -->
<TargetFramework>netstandard2.1</TargetFramework>
<!-- Define full namespaces to be able to shorten the folder and project names -->
<AssemblyName>My.Full.Namespace</AssemblyName>
<RootNamespace>My.Full.Namespace</RootNamespace>
<!-- Mandatory for Sonar: easy to create with Visual Studio tool to generate Guids -->
<ProjectGuid>{xxxx-xxx-xxx-xxx-xxxxx}</ProjectGuid>
<!-- On tests projects and console / web applications -->
<IsPackable>true</IsPackable>
</PropertyGroup>
<!-- Mandatory -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
-
Copy an official
.editorconfig
file, such as the one used by dotnet/roslyn -
Run the .NET global tool to make sure all conventions are applied
dotnet format