Skip to content

Permissive string types - #4638

Merged
rainersigwald merged 1 commit into
dotnet:masterfrom
rainersigwald:permissive-string-types
Aug 20, 2019
Merged

rainersigwald merged 1 commit into
dotnet:masterfrom
rainersigwald:permissive-string-types

Conversation

@rainersigwald

@rainersigwald rainersigwald commented Aug 19, 2019 •

Copy link
Copy Markdown
Member

This builds on #4588; the only new change is 8c2ff60, but I wanted to expand on the newly-extracted IsString().

rainersigwald/msbuild@StronglyTypedResourceBuilder-ResXDataNode...permissive-string-types

Description

Support more assembly-qualified names for string in .resx files.

Customer Impact

Some legacy .resx files created with .NET 2.0 type references caused exceptions at runtime rather than returning strings.

Regression

Regression from .NET Framework functionality; bugs in features new to crossplatform .NET Core MSBuild.

Risk

Low--impacts only the new resource codepaths.

@rainersigwald rainersigwald added the Area: Task: GenerateResource Problems with the task itself, resgen.exe, and resx resources in general. label Aug 19, 2019
@rainersigwald rainersigwald added this to the MSBuild 16.3 milestone Aug 19, 2019
@rainersigwald
rainersigwald requested a review from ericstj August 19, 2019 19:57
Comment thread eng/Packages.props Resolved
Comment thread src/Tasks/GenerateResource.cs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Previously this was ConfigurationException and SecurityException. Now ConfigurationException and SystemException. Why? Also, are you actually seeing the ConfigurationException on .NETCore?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, as I recall the only exception I could catch in the test that exercised this codepath was a SystemException-derived private type. Since you're discouraging using ConfigurationManager, I'll leave the full framework type catches alone and catch that only for core.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Details for posterity: when passing an unrecognized language (like in the test Microsoft.Build.UnitTests.GenerateResource_Tests.InProc.PropertyErrors.UnknownStronglyTypedLanguage), .NET Core CodeDOM throws a private ConfigurationErrorsException, which is a SystemException.

@rainersigwald
rainersigwald force-pushed the permissive-string-types branch from a00a323 to a2b66d0 Compare August 20, 2019 02:18
@rainersigwald rainersigwald added the Approved to merge Approved by .NET Tactics for servicing or QB mode checkins label Aug 20, 2019
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 Area: Task: GenerateResource Problems with the task itself, resgen.exe, and resx resources in general.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants