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

Add VCTargetsPath to VerifyVSDistributionPath #10554

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

rainersigwald
Copy link
Member

Followup and extension to #9625.

This changes the experience for trying to dotnet msbuild vcxproj from

ConsoleApplication3.vcxproj(28,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.

to

ConsoleApplication3.vcxproj(28,3): error MSB4278: The imported file "$(VCTargetsPath)\Microsoft.Cpp.Default.props" does not exist and appears to be part of a Visual Studio component. This file may require MSBuild.exe in order to be imported successfully, and so may fail to build in the dotnet CLI.

This changes the experience for trying to `dotnet msbuild` vcxproj from

```
ConsoleApplication3.vcxproj(28,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.
```

to

```
ConsoleApplication3.vcxproj(28,3): error MSB4278: The imported file "$(VCTargetsPath)\Microsoft.Cpp.Default.props" does not exist and appears to be part of a Visual Studio component. This file may require MSBuild.exe in order to be imported successfully, and so may fail to build in the dotnet CLI.
```
@rainersigwald rainersigwald merged commit 9b15d8b into dotnet:main Aug 23, 2024
10 checks passed
@rainersigwald rainersigwald deleted the extend-vs-check-to-vcxproj branch August 23, 2024 15:13
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

Successfully merging this pull request may close these issues.

3 participants