-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
GenerateResource does not fail when converting binary .resx resources to .txt resources #308
Comments
I looked at all the FEATURE_RESX_RESOURCE_READER instances, and it modified the contract in the following manner: Read from .resx - allowed, but values are cast to string, not interpreted. Therefore binary resources referenced via a file are not loaded into their .net objects. Either the contract for resgen.exe and .resx format is different for .net core, or this is a bug Write to .resx - not allowed |
This is fixable now that the ResX types are available in .NET Core 2, but MSBuild can't take advantage of that yet. |
These now pass, or fail for a different reason. Fixes dotnet#308. fixup! Enable UnsupportedTextType test
Closes dotnet#308 by re-enabling the tests.
…0213.12 (dotnet#308) - Microsoft.Dotnet.Toolset.Internal - 3.1.200-preview.20113.12 Dependency coherency updates - Microsoft.Net.Compilers - 3.5.0-beta3-20114-02 (parent: Microsoft.Dotnet.Toolset.Internal)
On the full framework, if a .resx data element points to a path and there's a type specified to read that file, the conversion of the .resx resource to a .txt resource is impossible and the tasks logs an error (since .txt resources cannot have binary values).
However, the .net core behaviour is to write the file path to the .txt.
This happens because the full framework uses a special xml reader, ResXResourceReader , that reads a path in the .resx file directly to its specified .net object. However this special xml reader is not available in .net core, so a normal xml reader is used instead, which just reads the text file name.
Tests that capture failure:
Other implications
@dsplaisted Should we copy the ResXResourceReader type to the msbuild codebase? If we try to mimic its behaviour, we end up re-implementing it.
The text was updated successfully, but these errors were encountered: