microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Build Window / Build APPX Fails cannot find Microsoft.Cpp.props #7462

Closed Naphier closed 9 months ago

Naphier commented 4 years ago

MRTK 2.3.0 Unity 2019.3.3f1 Visual Studio 2019 v16.4.5 (with MSBuild installed v15.9.21.664) image

====

Unity builds the Unity Project fine, but when it tries to compile the VS Project to build the appx it fails to find the below file:

3>C:\Users\napla\Desktop\MRTK2Play\Builds\WSAPlayer\Il2CppOutputProject\Il2CppOutputProject.vcxproj(3955,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
UnityEngine.Debug:Log(Object)
Microsoft.MixedReality.Toolkit.<>c__DisplayClass1_0:<StartProcessAsync>g__OnOutputDataReceived|2(Object, DataReceivedEventArgs) (at Assets/MixedRealityToolkit/Extensions/ProcessExtensions.cs:104)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()

File does not exist in that directory. I have created that directory and added the file and then a new error:

 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props(29,5): error MSB4186: Invalid static method invocation syntax: "[Microsoft.Build.Utilities.ToolLocationHelper]::FindRootFolderWhereAllFilesExist($(_VCTargetsPathFolders), $(_RelativeToolsetFiles))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.FindRootFolderWhereAllFilesExist' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).  [C:\Users\napla\Desktop\MRTK2Play\Builds\WSAPlayer\Il2CppOutputProject\Il2CppOutputProject.vcxproj]
UnityEngine.Debug:Log(Object)
Microsoft.MixedReality.Toolkit.<>c__DisplayClass1_0:<StartProcessAsync>g__OnOutputDataReceived|2(Object, DataReceivedEventArgs) (at Assets/MixedRealityToolkit/Extensions/ProcessExtensions.cs:104)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()

It appears that $(VCTargetsPath) is not resolving correctly when run from Unity. If I open the generated VS Project I am able to build fine. I checked and $(VCTargetsPath) resolves to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160 on my machine. And indeed the file in question exists there.

stale[bot] commented 4 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] commented 4 years ago

This issue has been closed by an automated process because it is stale. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] commented 2 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!