How to add project in aspnetcore repo?
I tried to add my project as described in \aspnetcore\docs\ReferenceResolution.md but some of the explanations were not obvious to me, so I made a small guide.
- Add project (it is obvious) in dir - \src\MyProject. Add a inner dir- srcas is customary here so eventually path to project will be- \src\MyProject\sec.
- Add in \eng\Build.props1 2 3 4 5 6 7 <DotNetProjects Include=" $(RepoRoot)src\MyProject\**\src\*.csproj; ... " Exclude=" ..." Condition=" '$(BuildMainlyReferenceProviders)' == 'true' " /> 
- Run \eng\scripts\GenerateProjectList.ps1
- Add in - eng\Dependencies.props- 1 2 3 4 - <ItemGroup Label=".NET team dependencies (Non-source-build)" Condition="'$(DotNetBuildFromSource)' != 'true'"> ... <LatestPackageReference Include="MyProject" /> </ItemGroup> 
- Run - \restore.cmd
- dotnet sln AspNetCore.sln add .\src\MyProject\src
- Now you can add links to any csproj<Reference Include="MyProject" />
- Add scripts to - \src\MyProject\to work with project- build.cmd1 2 3 4 @ECHO OFF SET RepoRoot=%~dp0..\.. %RepoRoot%\eng\build.cmd -projects %~dp0**\*.*proj %* 
- MyProject.slnf1 2 3 4 5 6 7 8 { "solution": { "path": "..\\..\\AspNetCore.sln", "projects": [ "src\\MyProject\\src\\MyProject.csproj" ] } }
- startvs.cmd - 1 2 3 - @ECHO OFF %~dp0..\..\startvs.cmd %~dp0MyProject.slnf 
 
- build.cmd
 This post is licensed under  CC BY 4.0  by the author.