-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make StronglyTypedResourceGenerator work on .NET Core #3819
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
Closed
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
02f1e31
Enable Mono CI builds (#1481)
radical 9f13df6
Revert "Enable Mono CI builds"
rainersigwald d7bf820
Merge branch 'master' of github.com:Microsoft/msbuild
90d20bf
First step at porting StronglyTypedResourceBuilder
wjk 54dc675
Fix build under FEATURE_CODEDOM && .NET Core
wjk 3f80285
Update StronglyTypedResourceBuilder to operate on type name strings
wjk acdea2e
Fix non-string resource handling
wjk f45af2a
Fix indentation error
wjk 6a3e243
Fix handling of ResXFileRef objects
wjk 0242f82
Update STRB to work on types as well as type names
wjk 3660242
Fix failing unit test
wjk 9348e5b
Use StringComparison.Ordinal
iSazonov be56e2c
Use StringComparison.Ordinal
iSazonov 8f448bc
Fix build
wjk 423cfc1
Don't print out non-string values in the STR file
wjk b60a54a
Merge branch 'master' into resgen-improvements
wjk 6dc39a1
Address PR feedback
wjk b118be6
Address more PR feedback
wjk bc0f888
Use typeof(object) when the value is null
wjk e45c285
Revert "Use typeof(object) when the value is null"
wjk c5e116f
Merge branch 'master' of github.com:Microsoft/msbuild
wjk afe12c7
Merge branch 'master' into resgen-improvements
wjk 7e54b77
Reinstate "Use typeof(object) when the value is null"
wjk 5414146
Fix failing unit tests
wjk 1143d53
Fix test failure
wjk 019bff0
Enable FEATURE_CODEDOM only for Tasks and its unit tests
06e1bc2
Catch appropriate exception for .NET Core CodeDom
57d9011
Fix unit test on non-Windows platform
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,16 +139,23 @@ private string GenerateCode(out string extension) | |
| { | ||
| provider = CodeDomProvider.CreateProvider(Language); | ||
| } | ||
| #if FEATURE_WINFORMS_RESX | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (This is where it's still #if'ed out that I referenced in earlier comment) |
||
| catch (System.Configuration.ConfigurationException ex) | ||
| { | ||
| Log.LogErrorWithCodeFromResources("WriteCodeFragment.CouldNotCreateProvider", Language, ex.Message); | ||
| return null; | ||
| } | ||
| #endif | ||
| catch (SecurityException ex) | ||
| { | ||
| Log.LogErrorWithCodeFromResources("WriteCodeFragment.CouldNotCreateProvider", Language, ex.Message); | ||
| return null; | ||
| } | ||
| catch (SystemException ex) | ||
| { | ||
| Log.LogErrorWithCodeFromResources("WriteCodeFragment.CouldNotCreateProvider", Language, ex.Message); | ||
| return null; | ||
| } | ||
|
|
||
| extension = provider.FileExtension; | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elsewhere you still have configuration #if'ed out. Does CodeDomProvider actually throw configuration exception on .NET Core? I think we should avoid adding a dependency on it if it's not needed.