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

Set props & envs to diagnose null ref issue #42320

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/SourceBuild/content/repo-projects/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
<!-- Pass locations for assets -->
<BuildArgs>$(BuildArgs) /p:SourceBuiltAssetsDir=$(ArtifactsAssetsDir)</BuildArgs>
<BuildArgs>$(BuildArgs) /p:SourceBuiltAssetManifestsDir=$(RepoAssetManifestsDir)</BuildArgs>
<!-- TODO: Needed to debug null ref issue. Remove once https://github.com/dotnet/dnceng/issues/3305 is resolved -->
<BuildArgs>$(BuildArgs) /p:Features=debug-analyzers</BuildArgs>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to flow everywhere are needed or should this be set as an env?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flows all the way into the inner builds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately /p: in MSBuild is a global final setting. So this would override anyone that is using <Features> in their project / props files. That is mostly esoteric copmiler flags so unlikley it's being used actively right now. For the moment think we should go forward with this as is to track down this problem.

@baronfel, @rainersigwald another case where a version of -p: which was initial value not final value would be useful.

</PropertyGroup>

<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
Expand Down Expand Up @@ -136,6 +138,10 @@
See https://github.com/dotnet/source-build/issues/541 -->
<EnvironmentVariables Include="MSBUILDDISABLENODEREUSE=1" />

<!-- TODO: Needed to debug null ref issue. Remove once https://github.com/dotnet/dnceng/issues/3305 is resolved -->
<EnvironmentVariables Include="DOTNET_DbgEnableMiniDump=1" />
<EnvironmentVariables Include="DOTNET_DbgMiniDumpType=2" />
<EnvironmentVariables Include="DOTNET_DbgMiniDumpName=$(ArtifactsLogDir)%p.dmp" />
</ItemGroup>

<!--
Expand Down
Loading