@@ -36,16 +36,28 @@ function Connect-CommonRepo {
3636 if ($LASTEXITCODE -ne 0 ) {
3737 throw " Failed to add $csproj to Accounts.sln"
3838 }
39+ <#
40+ known common project references:
41+ Authentication.csproj -> Authentication.Abstractions, ResourceManager
42+ Accounts.csproj -> Authentication.Abstractions, ResourceManager, Common
43+ Accounts.Test.csproj -> Authentication.Abstractions, ResourceManager, Common
44+ TestFx.csproj -> Graph.Rbac.csproj
45+ AssemblyLoading.csproj -> Common
46+ #>
47+ # add all common projects to Authentication.csproj because it will be referenced by most Az projects
3948 dotnet add ./ Authentication/ Authentication.csproj reference $csproj
4049 if ($LASTEXITCODE -ne 0 ) {
4150 throw " Failed to add $csproj to Authentication.csproj"
4251 }
4352 }
4453
54+ # AssemblyLoading.csproj references Common.csproj and does not reference Autehtication.csproj
4555 dotnet add ./ AssemblyLoading/ AssemblyLoading.csproj reference " $CommonRepoPath /src/Common/Common.csproj"
4656 if ($LASTEXITCODE -ne 0 ) {
4757 throw " Failed to add Common.csproj to AssemblyLoading.csproj"
4858 }
59+
60+ # add common project references below for csproj which does not reference Authentication.csproj
4961 }
5062 finally {
5163 Pop-Location
@@ -81,7 +93,6 @@ function Connect-CommonRepo {
8193function Disconnect-CommonRepo {
8294 Write-Host " Please run the following commands to undo Connect-CommonRepo. Double check those files do not have wanted changes.
8395 git checkout -- ./src/Accounts/Accounts.sln
84- git checkout -- ./src/Accounts/Accounts/Accounts.csproj
8596 git checkout -- ./src/Accounts/AssemblyLoading/AssemblyLoading.csproj
8697 git checkout -- ./src/Accounts/Authentication/Authentication.csproj
8798 git checkout -- ./tools/Common.Netcore.Dependencies.targets
0 commit comments