Open mcclure opened 8 months ago
As per https://github.com/dotnet/sdk/issues/10239
The 'dotnet' command does not support building C++ projects (vcxproj)
More specifically, the version of msbuild that comes with dotnet can't. You'll need to use the full fledged MSBuild that ships with Visual Studio.
Issue Description
I have a C# project (csproj) with a C/C++ project as a dependency (vcxproj): the vcxproj builds a shared object file which the csproj makes use of via p/invoke. I set this up in Visual Studio 2022 on Windows, where I find that invoking "msbuild" builds the entire project including the C parts. I eventually will want the project to also work on Linux and Mac; however, when I check out my project and run
dotnet build
, I get an unhelpful error message about "/Microsoft.Cpp.Default.props" not being found. (I have been told a recent PR improves this to a helpful error message.) None of this is the problem.The problem is that during the above experience, I find myself wondering the following reasonable questions:
And I do not find these questions answered either in the README or in any of the pages I checked linked from the README.
Steps to Reproduce
"Open https://github.com/dotnet/msbuild in a web browser and read it"
Expected Behavior
It's hard for me to give a specific suggestion because I don't know which of the following realities we live in:
I think whichever of the above realities we live in should be explained in two places:
In the README. Under "Building MSBuild in Unix (Mac & Linux)" it currently says "MSBuild can be run on Unix systems that support .NET Core." If it were me I would move this above the "Building" section into the introduction (because it's not specifically about building) and extend it to explain exactly what parts of "msbuild" do and don't work on Unix systems.
On the "msbuild" documentation page on learn.microsoft.com, which has good SEO and also is linked from the github Readme, there is a section "MSBuild is open source":
https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild?view=vs-2022#msbuild-is-open-source
This says: "MSBuild is an open-source project that accepts user contributions, just like the rest of the .NET ecosystem." Having made that claim, it would be appropriate to say which parts of MSBuild are and aren't open source. (And if we're in "reality 3" and the non-open-source parts are technically not "part of MSBuild", you should still explain this, because most users will have had MSBuild installed incidentally as part of some other system such as
dotnet
or Visual Studio which comes with those additional components, and we will not be able to tell the difference.)Actual Behavior
It's vague
Analysis
No response
Versions & Configurations
README version 42383a8