Skip to content

Commit 6bc02fd

Browse files
authored
Fix SB assembly version test (#44192)
1 parent 0052c4d commit 6bc02fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ private void RemoveExcludedAssemblyVersionPaths(Dictionary<string, Version?> sbS
9898
{
9999
string assemblyPath = sbSdkFileArray[i];
100100
Version? sbVersion = sbSdkAssemblyVersions[assemblyPath];
101-
Version? msftVersion = msftSdkAssemblyVersions[assemblyPath];
101+
if (!msftSdkAssemblyVersions.TryGetValue(assemblyPath, out Version? msftVersion))
102+
{
103+
sbSdkAssemblyVersions.Remove(assemblyPath);
104+
continue;
105+
}
102106

103107
if (sbVersion is not null &&
104108
msftVersion is not null &&

0 commit comments

Comments
 (0)