Skip to content

Commit c85bee4

Browse files
committed
Fixed possible incorrect MSBuild properties when using CIM
IsolatedEnv and GetMutualPropValue Broken in #53
1 parent 3265b12 commit c85bee4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vsSolutionBuildEvent/IsolatedEnv.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,13 @@ public IsolatedEnv(string solutionFile, IDictionary<string, string> properties)
258258
SolutionFile = solutionFile ?? throw new ArgumentNullException(nameof(solutionFile));
259259
_properties = properties ?? throw new ArgumentNullException(nameof(properties));
260260

261+
// better to use it before accessing to {Sln} property due to possible custom env updating
261262
foreach(var p in properties) {
262263
ProjectCollection.GlobalProjectCollection.SetGlobalProperty(p.Key, p.Value);
263264
}
264265

265266
SolutionPath = Sln.SolutionDir;
266-
slnProperties = Sln.Properties;
267+
slnProperties = Sln.Properties.ExtractDictionary.AddOrUpdate(properties);
267268
SolutionFileName = slnProperties.GetOrDefault(PropertyNames.SLN_NAME, PropertyNames.UNDEFINED);
268269
IsOpenedSolution = true;
269270
}

0 commit comments

Comments
 (0)