All System.Private.Corelib.csproj to build successfully in VS #1284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These two changes are necessary for the project to open and build in VS for me.
Why did
'$(BuildingInsideVisualStudio)' != 'true' "
exist here? @stephentoub added it in dotnet/coreclr#26076 to fix https://github.com/dotnet/coreclr/issues/26075 because it required that a build had to happen outside VS to generate the file - this does not use T4 or something VS understands.Why did that not cause these compilation errors at that time? If I sync back to that point in coreclr and open the corelib project, I see that VS does not consider FEATURE_PERFTRACING defined. It is not clear why. I see the define present in $(DefineConstants) and I see it going to the compiler in the build log that VS produces, but nevertheless the VS "squiggle" build is apparently not receiving this define. Using the same version of VS against the head of dotnet/runtime, it is defined. Something changed in the build between those times that means VS now gets initialized correctly.
I figure it is better to have to build that file outside VS, and have build then work in VS, than have build always broken in VS.
The message explaining how to create it is a hack. I can remove it, but the debt already exists (a file that VS cannot create) and it seems better to help contributors be successful.