@@ -36,16 +36,28 @@ function Connect-CommonRepo {
36
36
if ($LASTEXITCODE -ne 0 ) {
37
37
throw " Failed to add $csproj to Accounts.sln"
38
38
}
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
39
48
dotnet add ./ Authentication/ Authentication.csproj reference $csproj
40
49
if ($LASTEXITCODE -ne 0 ) {
41
50
throw " Failed to add $csproj to Authentication.csproj"
42
51
}
43
52
}
44
53
54
+ # AssemblyLoading.csproj references Common.csproj and does not reference Autehtication.csproj
45
55
dotnet add ./ AssemblyLoading/ AssemblyLoading.csproj reference " $CommonRepoPath /src/Common/Common.csproj"
46
56
if ($LASTEXITCODE -ne 0 ) {
47
57
throw " Failed to add Common.csproj to AssemblyLoading.csproj"
48
58
}
59
+
60
+ # add common project references below for csproj which does not reference Authentication.csproj
49
61
}
50
62
finally {
51
63
Pop-Location
@@ -81,7 +93,6 @@ function Connect-CommonRepo {
81
93
function Disconnect-CommonRepo {
82
94
Write-Host " Please run the following commands to undo Connect-CommonRepo. Double check those files do not have wanted changes.
83
95
git checkout -- ./src/Accounts/Accounts.sln
84
- git checkout -- ./src/Accounts/Accounts/Accounts.csproj
85
96
git checkout -- ./src/Accounts/AssemblyLoading/AssemblyLoading.csproj
86
97
git checkout -- ./src/Accounts/Authentication/Authentication.csproj
87
98
git checkout -- ./tools/Common.Netcore.Dependencies.targets
0 commit comments