Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild fails because VCTargetsPath is not set #57

Open
sfiruch opened this issue May 8, 2024 · 0 comments
Open

MSBuild fails because VCTargetsPath is not set #57

sfiruch opened this issue May 8, 2024 · 0 comments

Comments

@sfiruch
Copy link

sfiruch commented May 8, 2024

I cannot use Disasmo in my solution, because of build failures in a referenced VC++ project:

MSBuild version 17.9.8+b34f75857 for .NET
  Determining projects to restore...
  Restored C:\Users\de\Source\my-awesome-project\CTP1bLibrary\CTP1bLibrary.csproj (in 373 ms).
  Restored C:\Users\de\Source\my-awesome-project\Scanner2Mat\Scanner2Mat.csproj (in 373 ms).
  3 of 5 projects are up-to-date for restore.
C:\Users\de\Source\my-awesome-project\MatIRILib\MatIRILib.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.

Apparently MSBuild is looking for Microsoft.Cpp.Default.props in the wrong directory. The import in the project file is
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />. It appears that VCTargetsPath is not set correctly when Disasmo tries to build my solution.

Repro

  1. Create a C# 8 project
  2. Add a reference to a VC++ project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant