dotnet / dotnet/msbuild

[Bug]: ArgumentNullException in Graph Build API

Open
#10,700 0 comments 0 reactions 0 assignees View on GitHub
bug internal-team-onboarding Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Issue Description

ArgumentNullException when you don't provide GlobalProperties parameter to `ProjectGraphEntryPoint`.

### Steps to Reproduce

```
git clone https://github.com/AndyGerlicher/graphbuildrepro.git
cd graphbuildrepro
.\build.cmd
```

### Expected Behavior

No `ArgumentNullException` on net9.0

### Actual Behavior

Yes `ArgumentNullException` on net9.0

### Analysis

Pretty sure it's [here](https://github.com/dotnet/msbuild/blob/5ef4a3fbdc1e0590065a73589009bfc41ae8c673/src/Build/Graph/GraphBuildRequestData.cs#L225). Introduced in the refactor [here](https://github.com/dotnet/msbuild/pull/10172). Fix might be just adding a null check on `Value.GlobalProperties`.

### Versions & Configurations

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.