From: Dan Moseley Date: Fri, 3 Jan 2020 17:29:50 +0000 (-0800) Subject: Improve message for missing C++ workload (#1253) X-Git-Tag: submit/tizen/20210909.063632~10576 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e2c61bc2a0a5923bd3564b3d646d9bf2dbe0866;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Improve message for missing C++ workload (#1253) * Improve message for missing C++ workload * typo: * Fix case of missing rootdir --- diff --git a/src/coreclr/build-test.cmd b/src/coreclr/build-test.cmd index 0bf7021..c625894 100644 --- a/src/coreclr/build-test.cmd +++ b/src/coreclr/build-test.cmd @@ -593,13 +593,10 @@ exit /b 1 :NoDIA echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^ -This is due to a bug in the Visual Studio installer. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^ -at the install location of previous Visual Studio version. The workaround is to copy the DIA SDK folder from the Visual Studio install location ^ -of the previous version to "%VSINSTALLDIR%" and then build. -REM DIA SDK not included in Express editions -echo Visual Studio Express does not include the DIA SDK. ^ -You need Visual Studio 2017 or 2019 (Community is free). -echo See: https://github.com/dotnet/runtime/blob/master/docs/coreclr/project-docs/developer-guide.md#prerequisites +Did you install all the requirements for building on Windows, including the "Desktop Development with C++" workload? ^ +Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md ^ +Another possibility is that you have a parallel installation of Visual Studio and the DIA SDK is there. In this case it ^ +may help to copy its "DIA SDK" folder into "%VSINSTALLDIR%" manually, then try again. exit /b 1 :PrecompileFX diff --git a/src/coreclr/build.cmd b/src/coreclr/build.cmd index 9ceaf5b..7861c6e 100644 --- a/src/coreclr/build.cmd +++ b/src/coreclr/build.cmd @@ -1090,11 +1090,8 @@ exit /b 1 :NoDIA echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^ -This is due to a bug in the Visual Studio installer. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^ -at the install location of previous Visual Studio version. The workaround is to copy the DIA SDK folder from the Visual Studio install location ^ -of the previous version to "%VSINSTALLDIR%" and then build. -REM DIA SDK not included in Express editions -echo Visual Studio Express does not include the DIA SDK. ^ -You need Visual Studio 2017 or 2019 (Community is free). -echo See: https://github.com/dotnet/runtime/blob/master/docs/coreclr/project-docs/developer-guide.md#prerequisites +Did you install all the requirements for building on Windows, including the "Desktop Development with C++" workload? ^ +Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md ^ +Another possibility is that you have a parallel installation of Visual Studio and the DIA SDK is there. In this case it ^ +may help to copy its "DIA SDK" folder into "%VSINSTALLDIR%" manually, then try again. exit /b 1 diff --git a/src/installer/corehost/build.cmd b/src/installer/corehost/build.cmd index d54650b..d22d77d0d 100644 --- a/src/installer/corehost/build.cmd +++ b/src/installer/corehost/build.cmd @@ -85,8 +85,7 @@ set __VSVersion=15 2017 call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %__VCBuildArch% :SetupDirs - -if %__rootDir% == "" ( +if [%__rootDir%] == [] ( echo Root directory must be provided via the rootDir parameter. exit /b 1 ) @@ -101,6 +100,7 @@ echo. if %__CMakeBinDir% == "" ( set "__CMakeBinDir=%__binDir%\%__TargetRid%.%CMAKE_BUILD_TYPE%" ) + if %__IntermediatesDir% == "" ( set "__IntermediatesDir=%__objDir%\%__TargetRid%.%CMAKE_BUILD_TYPE%\corehost" ) @@ -118,13 +118,10 @@ if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%" if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^ -This is due to a bug in the Visual Studio installer. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^ -at VS install location of previous version. Workaround is to copy DIA SDK folder from VS install location ^ -of previous version to "%VSINSTALLDIR%" and then resume build. -:: DIA SDK not included in Express editions -echo Visual Studio 2013 Express does not include the DIA SDK. ^ -You need Visual Studio 2013+ (Community is free). -echo See: https://github.com/dotnet/runtime/blob/master/docs/coreclr/project-docs/developer-guide.md#prerequisites +Did you install all the requirements for building on Windows, including the "Desktop Development with C++" workload? ^ +Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md ^ +Another possibility is that you have a parallel installation of Visual Studio and the DIA SDK is there. In this case it ^ +may help to copy its "DIA SDK" folder into "%VSINSTALLDIR%" manually, then try again. exit /b 1 :GenVSSolution diff --git a/src/libraries/Native/build-native.cmd b/src/libraries/Native/build-native.cmd index 0fd1ae9..c1a5ade 100644 --- a/src/libraries/Native/build-native.cmd +++ b/src/libraries/Native/build-native.cmd @@ -120,11 +120,10 @@ echo %MSBUILD_EMPTY_PROJECT_CONTENT% > "%__artifactsDir%\obj\native\Directory.Bu if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^ -Make sure you selected the correct dependencies when installing Visual Studio. -:: DIA SDK not included in Express editions -echo Visual Studio Express does not include the DIA SDK. ^ -You need Visual Studio 2017 or 2019 (Community is free). -echo See: https://github.com/dotnet/runtime/blob/master/docs/libraries/building/windows-instructions.md#required-software +Did you install all the requirements for building on Windows, including the "Desktop Development with C++" workload? ^ +Please see https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/windows-requirements.md ^ +Another possibility is that you have a parallel installation of Visual Studio and the DIA SDK is there. In this case it ^ +may help to copy its "DIA SDK" folder into "%VSINSTALLDIR%" manually, then try again. exit /b 1 :GenVSSolution