Skip to content

Conversation

@benvillalobos
Copy link
Member

@benvillalobos benvillalobos commented Aug 13, 2019

Description

In SDK projects and new project system, we have eliminated the need for DependentUpon to make the appropriate file nesting in the IDE tree. However, there is a place where the build actually uses DependentUpon to:

  1. Locate a source file, and parse (!) it to get first class name and namespace
  2. Generate .resources accordingly.

But people and features in VS rely on this and it has been a consistent source of feedback in moving to .NET Core 3.0. This opts into new behavior to use a convention instead of requiring explicit metadata.

Original issue: dotnet/msbuild#4488

This change is dependent upon: dotnet/msbuild#4597

Customer Impact

In a fairly common situation for projects that use resources, avoids the need to specify DependentUpon metadata for each resource.

Regression?

No

Risk

Low risk.

Test changes in this PR

Added DependentUponTest. Currently it gets skipped, but this test was verified working on a local machine using a version of MSBuild that had the corresponding fix.

@benvillalobos
Copy link
Member Author

Should this be conditional on target framework or used for anything using the sdk?

@nguerrera

@nguerrera
Copy link
Contributor

I think this should be conditional on target framework >= netcoreapp3.0 or >= netstandard2.1. Otherwise, this would be a potential breaking change.

@nguerrera
Copy link
Contributor

cc @davkean

Note: This test fails without its MSBuild counterpart. I verified that this test ran successfully on a local machine with a version of MSBuild that had the needed change. Until that change is merged in, this test will skip & refer to the original issue.
Copy link
Contributor

@nguerrera nguerrera left a comment

Choose a reason for hiding this comment

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

Needs to be .netstandard 2.1 not .netframework.

Co-Authored-By: Rainer Sigwald <raines@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants