File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/Microsoft.VisualStudio.SlnGen Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,13 @@ internal static int Execute(ProgramArguments arguments, IConsole console)
145145
146146 bool useSimpleCache = true ;
147147
148- var msbuildVersion = FileVersionInfo . GetVersionInfo ( CurrentDevelopmentEnvironment . MSBuildExe . FullName ) ;
148+ #if NETFRAMEWORK
149+ string msBuildPath = CurrentDevelopmentEnvironment . MSBuildExe . FullName ;
150+ #else
151+ string msBuildPath = CurrentDevelopmentEnvironment . MSBuildDll . FullName ;
152+ #endif
153+
154+ var msbuildVersion = FileVersionInfo . GetVersionInfo ( msBuildPath ) ;
149155
150156 // Work around https://github.com/dotnet/msbuild/issues/11394 by falling back to the slower PRE cache
151157 // on known-affected MSBuild versions (this should be much more tightly scoped after that bug is fixed).
@@ -159,11 +165,7 @@ internal static int Execute(ProgramArguments arguments, IConsole console)
159165 CacheFileEnumerations = true ,
160166 LoadAllFilesAsReadOnly = true ,
161167 UseSimpleProjectRootElementCacheConcurrency = useSimpleCache ,
162- #if NETFRAMEWORK
163- MSBuildExePath = CurrentDevelopmentEnvironment . MSBuildExe . FullName ,
164- #else
165- MSBuildExePath = CurrentDevelopmentEnvironment . MSBuildDll . FullName ,
166- #endif
168+ MSBuildExePath = msBuildPath ,
167169 } ;
168170
169171 LoggerVerbosity verbosity = ForwardingLogger . ParseLoggerVerbosity ( arguments . Verbosity ? . LastOrDefault ( ) ) ;
You can’t perform that action at this time.
0 commit comments