dotnet / dotnet/msbuild

ProjectInstance constructor should consider global properties from ProjectCollection

Open
#12,519 2 comments 1 reaction 0 assignees View on GitHub
Priority:3 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Issue Description

https://github.com/dotnet/msbuild/blob/610aa6fdc1ab787670d0ba2db53a4546ae63a874/src/Build/Instance/ProjectInstance.cs#L316C92-L316C108

Currently, only the global properties passed to ProjectInstance constructor are considered. I think they should be merged with the global properties of the ProjectCollection, similar to:

https://github.com/dotnet/msbuild/blob/610aa6fdc1ab787670d0ba2db53a4546ae63a874/src/Build/Definition/ProjectCollection.cs#L1226-L1243

### Steps to Reproduce

Create ProjectCollection with global properties, and then create ProjectInstance with different set of global properties.

### Expected Behavior

They should be merged.

### Actual Behavior

Only those passed to ProjectInstance constructor are considered.

### Analysis

_No response_

### 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.