An API to locate MSBuild assemblies from an installed Visual Studio location. Use this to ensure that calling the MSBuild API will use the same toolset that a build from Visual Studio or msbuild.exe would.
Other
218
stars
83
forks
source link
Fix NullReferenceException in GetDevConsoleInstance() #66
When the environment variable VSINSTALLDIR was set but VisualStudioVersion was not, GetDevConsoleInstance() was throwing a NullReferenceException because a null-Version was passed to the VisualStudioInstance constructor.
This PR adds a check to ensure version is not null. If the version is null, GetDevConsoleInstance will return null (i.e. no VS instance found)
Fixes #65
When the environment variable
VSINSTALLDIR
was set butVisualStudioVersion
was not,GetDevConsoleInstance()
was throwing aNullReferenceException
because a null-Version was passed to theVisualStudioInstance
constructor.This PR adds a check to ensure version is not null. If the version is null,
GetDevConsoleInstance
will return null (i.e. no VS instance found)