VS19 + VS22 causes error - Visual Studio 2017 support for ARM64 is not installed - visual-studio

I have a local building agent for a Unity|HoloLens-Project. The whole time I had VS2019 on the agend installed and everything worked well. Today I had to install VS2022 on my agent because of a different .net 6 project (so it has nothing todo with my unity stuff!).
However, after installing VS2022, my Unity project can no longer be built with VS2019. I get the following output:
EXEC(0,0): Error : System.NotSupportedException: Visual Studio 2017 support for ARM64 is not installed.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): Error MSB3073: Der Befehl ""C:\agent\_work\1\b\UWP_Build\Il2CppOutputProject\\IL2CPP\build\deploy\netcoreapp3.1\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\agent\_work\1\b\UWP_Build\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\agent\_work\1\b\UWP_Build\\build\bin\ARM64\Release\\" -cachedirectory="C:\agent\_work\1\b\UWP_Build\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\agent\_work\1\b\UWP_Build\Il2CppOutputProject\\Source" --incremental-g-c-time-slice=3 --baselib-directory="C:\agent\_work\1\b\UWP_Build\Players\UAP\il2cpp\ARM64\Release" --avoid-dynamic-library-copy --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --relative-data-path=Data/il2cpp_data --map-file-parser="C:\agent\_work\1\b\UWP_Build\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" wurde mit dem Code -1 beendet.
Process 'msbuild.exe' exited with code '1'.
The whole thing makes no sense to me. If I have only VS19 installed everything runs. When I install VS22, I get this error message. I went back to the building agent myself and manually opened the project in VS19 and tried to creat/publish an APPX. There I got the already known errors displayed and one more:
System.NotSupportedException: Visual Studio 2017 support for ARM64 is not installed.
MSB3073 The command ""C:\agent\_work\1\b\UWP_Build\Il2CppOutputProject\\IL2CPP\build\deploy\netcoreapp3.1\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\agent\_work\1\b\UWP_Build\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\agent\_work\1\b\UWP_Build\\build\bin\ARM64\Release\\" -cachedirectory="C:\agent\_work\1\b\UWP_Build\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\agent\_work\1\b\UWP_Build\Il2CppOutputProject\\Source" --incremental-g-c-time-slice=3 --baselib-directory="C:\agent\_work\1\b\UWP_Build\Players\UAP\il2cpp\ARM64\Release" --avoid-dynamic-library-copy --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --relative-data-path=Data/il2cpp_data --map-file-parser="C:\agent\_work\1\b\UWP_Build\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" was terminated with the code -1.
MSB8020 The build tools for v143 (platform toolset = "v143") were not found. To build using the v143 build tools, install the v143 build tools. Alternatively, upgrade to the latest Visual Studio tools by selecting the Project menu or right-clicking the solution and selecting Reassign Solution.
Workload in my VSInstaller for VS19:
It doesn't make sense that VS17 with ARM64 is suddenly demanded. And it makes no sense that suddenly the build tools for version 143 are required. The project is opened with VS19(=v142) and not with VS22(=v143).

Related

Unable to install visaul studio properly and toolchains required for unity

After a fresh windows 11 install I haven't been able to get visual studio and building a game in unity to work.
Visual Studio 2019:
After I install visual studio with the correct modules for unity. it shows up in the installer as "installed" but when I turn of or restart my computer it does not show under the Installed section. Also when I open visual studio it gives a "Failed to load common IDE package" error. Referring to a file in: C:\Users"user"\AppData\Roaming\Microsoft\VisualStudio\16.0_971410d4.
I have tried:
Repairing visual studio.
Repairing visual studio and deleting the before mentioned directory.
Complete reinstall of the installer and visual studio.
Unity:
When I try to build my game I get this error: error:
Could not set up a toolchain for Architecture x64. Make sure you have the right build tools installed for il2cpp builds. Details:
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ().
I have tried:
Reinstalling the current engine version (Unity 2021.2.13f).
Upgrading the engine version to (Unity 2021.2.14f).
Reinstall Unity 2021.2.14f.
I think these two problems are tied together but I'm not sure.
~ Rasl2002
I fixed my problem.
https://developercommunity.visualstudio.com/t/access-denied-for-visual-studio-common-ide-package/962361
this link leads to the solution. you need to run:
icacls "C:\ProgramData\Microsoft" /reset /T /C
in an admin terminal.

LLVM Visual Studio Integration Failed

I'm trying to integrate LLVM with Visual Studio 15 2017, however I seem to be unable to get it to work. When running the LLVM installer after Visual Studio has been installed, I get a command prompt with the following error:
Installing MSVC integration...
Failed to find MSBuild toolsets directory.
MSVC integration install failed.
Press any key to continue . . .
After some research online, I found this SO link which has lead me to believe that the LLVM installer does not know how to install for VS15. As such, I tried installing the toolset found here manually. Now, I can see LLVM listed as a toolset in Visual Studio:
However, when I choose it as an option and try to compile a simple "Hello World" program, I get the following error:
error MSB8020: The build tools for LLVM-vs2017 (Platform Toolset = 'LLVM-vs2017') cannot be found.
To build using the LLVM-vs2017 build tools, please install LLVM-vs2017 build tools.
Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Is there something I am doing wrong here, or some step I missed when trying to get these two tools integrated?
LLVM Visual Studio Integration Failed
After the test, you should execute the AutoSetup.bat to install the LLVM 6.0.0 automatically.
Plasmacel provided a fork which is updated for LLVM 6.0.0 and provides better integration by providing include and library paths of LLVM/clang. In the file README.MD, you can find the some more details, like Automatic Installation:
Automatic Installation
Open a command prompt with Administrator rights
(DO NOT OPEN AutoSetup.bat with admin rights it won't load the files)
Go to the folder where AutoSetup.bat exists and type "AutoSetup"
If Automatic doesn't work, you can also go to the Manual Installation.
Hope this helps.

Visual Studio 2017 does not detect Windows Driver Kit installation

I already have Visual Studio 2017 professional with Desktop Development with C++ installed.
I am trying to build the Virtual Serial project found here:
https://github.com/Microsoft/Windows-driver-samples/tree/master/serial/VirtualSerial
When I try to build it, I get the error:
Severity Code Description Project File Line Suppression State
Error MSB8020 The build tools for WindowsUserModeDriver10.0 (Platform Toolset = 'WindowsUserModeDriver10.0') cannot be found. To build using the WindowsUserModeDriver10.0 build tools, please install WindowsUserModeDriver10.0 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". virtualserial C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets
I cannot find any instructions on installation aside from this website.
https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
I downloaded the WDK for Windows 10, version 1803.
I closed VS2017 and ran the installer.
When running the installer I got the message in the screenshot below, I clicked Next to continue installing
After running the installer, the project still does not build, with the same error: WindowsUserModeDriver10.0 is not installed.
What am I missing during installation? Is this the correct installer for regular VS2017 (not community edition)?
Thanks,
I know this is old, but I recently fell into this rabbit hole. What worked for me was uninstalling all of the WDKs, rebooting, and installing WDK 1803 (the wdksetup.exe program downloaded from Other WDK downloads shows version 10.0.17134.1 in properties). That WDK installer specifically calls out VS 2017 when you add the Visual Studio integration at the end of the install process.
In my situation, I installed vs2022 with SDK 19041 and WDK 19041.
After some testing, I realized that VS2022 only supports WDK 22621(so on this date). So I installed WDK 22621 and SDK 22621, and problem solved.
If you still can't find Kernel Driver Build option, try run this file C:\Program Files (x86)\Windows Kits\10\Vsix\VS2022\10.0.22621.0\WDK.vsix(WDK 19041 only has VS2019). It's a Visual Studio's extension.
According to this: https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware-winpc/windows-wdk-on-visual-studio-2017-community/fdbd2b44-e57a-4849-903d-04001205a764
WDK is not currently supported by visual studio 2017.
This is ridiculous

Visual Studio 2015 - Clang version not found when building from command line

I have a Xamarin-based solution in Visual Studio 2015. One of the projects is an Android native shared library containing C++ code.
When I build the solution from within VS 2015 IDE, everything works as expected. However, when I try to build the solution from the command line I get an error.
The build command is:
msbuild mytest.sln /p:Configuration=Release /p:Platform=ARM /t:Rebuild
The error I get is:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Clang_3_8 (Platform Toolset = 'Clang_3_8') cannot be found. To build using the Clang_3_8 build tools, please install Clang_3_8 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...".
My Visual Studio 2015 has all the updates applied. Wondering if anyone knows what the problem could be. Is it a path problem? Regards.
Turned out it is a path problem. Make sure to use the developer command prompt link under Program Files-->Visual Studio 2015->Visual Studio Tools. This batch file sets up proper paths, including the one for clang.

CL.exe error code

Has any of you got this error?
error MSB6006: "CL.exe" exited with code -1073741515.
I'm not able to find the meaning of the error code anywhere. I get it when building a C++ project in VS2013 Pro.
The project compiled fine in VS2010. I made no additional changes to it after updating VS.
Fixed. I changed the Platform Toolset from Widnows SDK 7.1 to Visual Studio 2013 (v120).

Resources