@@ -108,6 +108,14 @@ try {
108108 git mv src/ VSInsertionMetadata/ Library.VSInsertionMetadata.proj " src/VSInsertionMetadata/$LibraryName .VSInsertionMetadata.proj"
109109 if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
110110
111+ # Update project reference in test project. Add before removal to keep the same ItemGroup in place.
112+ dotnet add " test/$LibraryName .Tests" reference " src/$LibraryName "
113+ if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
114+ dotnet remove " test/$LibraryName .Tests" reference src/ Library/ Library.csproj
115+ if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
116+ git add " test/$LibraryName .Tests/$LibraryName .Tests.csproj"
117+ if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
118+
111119 # Refresh solution file both to update paths and give the projects unique GUIDs
112120 dotnet sln remove src/ Library/ Library.csproj
113121 if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
@@ -120,12 +128,10 @@ try {
120128 git add " $LibraryName .slnx"
121129 if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
122130
123- # Update project reference in test project. Add before removal to keep the same ItemGroup in place.
124- dotnet add " test/ $LibraryName .Tests " reference " src/ $LibraryName "
131+ # Establish a new strong-name key
132+ & $sn .Path - k 2048 strongname.snk
125133 if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
126- dotnet remove " test/$LibraryName .Tests" reference src/ Library/ Library.csproj
127- if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
128- git add " test/$LibraryName .Tests/$LibraryName .Tests.csproj"
134+ git add strongname.snk
129135 if ($LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
130136
131137 # Replace placeholders in source files
0 commit comments