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

Resource Naming DependentUpon Convention #4597

Merged

Conversation

benvillalobos
Copy link
Member

@benvillalobos benvillalobos commented Aug 8, 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: #4488

This change is dependent upon: dotnet/sdk#3533

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


Fixes #4488

Added new argument to CreateManifestResourceName: UseDependentUponConvention

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

Some nits, but looks good.

benvillalobos and others added 2 commits August 8, 2019 14:18
Co-Authored-By: Rainer Sigwald <raines@microsoft.com>
@nguerrera
Copy link
Contributor

cc @davkean

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.

LGTM :)

@@ -15,6 +15,8 @@ namespace Microsoft.Build.Tasks
/// </summary>
public class CreateVisualBasicManifestResourceName : CreateManifestResourceName
{
public override string SourceFileExtension => ".vb";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an F# equivalent to this somewhere? cc @KevinRansom

Copy link
Member

Choose a reason for hiding this comment

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

@rainersigwald rainersigwald added this to the MSBuild 16.3 milestone Aug 13, 2019
@livarcocc livarcocc added the Approved to merge Approved by .NET Tactics for servicing or QB mode checkins label Aug 15, 2019
@livarcocc
Copy link
Contributor

Do we need any follow up validation from the WPF/WinForms team? Any value in having them trying out a private before merging?

@benvillalobos
Copy link
Member Author

@livarcocc it certainly couldn't hurt, but I wouldn't think it's necessary. @rainersigwald may think otherwise

@rainersigwald
Copy link
Member

I think several folks are on vacation, but worth looping in @merriemcgaw @dreddy-work @zsd4yr.

@ericstj
Copy link
Member

ericstj commented Sep 10, 2019

Did you test this with an item that has a partial path as it's ItemSpec? /cc @Anipik

@rainersigwald
Copy link
Member

@ericstj are you hitting #4695? It should be fixed in the very latest builds (with #4702).

@ericstj
Copy link
Member

ericstj commented Sep 10, 2019

Yep that appears to be it. Thanks for the pointer. For some reason my searching didn't find it. I should have looked at referenced issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved to merge Approved by .NET Tactics for servicing or QB mode checkins ask-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support resource naming based on DependentUpon source by convention
5 participants