You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GenerateResource does not fail when converting binary .resx resources to .txt resources #308
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.
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 Read from .resource - not allowed
Write to .resx - not allowed Write to .resource - yes, but by coercing values to string
Activity
cdmihai commentedon Oct 21, 2015
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
Read from .resource - not allowed
Write to .resx - not allowed
Write to .resource - yes, but by coercing values to string
rainersigwald commentedon Jul 13, 2017
This is fixable now that the ResX types are available in .NET Core 2, but MSBuild can't take advantage of that yet.
Enable more resgen tests
Restore write-resource-to-text tests
Restore write-resource-to-text tests (#4830)
Update dependencies from https://github.com/dotnet/toolset build 2020…