Skip to content

Commit 8a5fa34

Browse files
committed
add final logic
1 parent 9328d36 commit 8a5fa34

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/msbuild/find-and-use-msbuild-versions.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ You cannot reference any MSBuild types (from the `Microsoft.Build` namespace) in
100100
```csharp
101101
void MethodThatDoesNotDirectlyCallMSBuild()
102102
{
103+
var instance = ... // select which of the installed instances to use
104+
103105
// Register a specific instance of MSBuild
104-
// Your application must determine the logic to locate an instance of MSBuild,
105-
// for example, the latest installed version, or the version that would be chosen
106-
// in the context of the caller's system environment
107106
MSBuildLocator.RegisterInstance(instance);
108107
MethodThatCallsMSBuild();
109108
}

0 commit comments

Comments
 (0)