4
Vote

Support for .NET framework 4

description

Please include support for .NET framework 4 based resx files, thanks

comments

papadi wrote Dec 19, 2010 at 9:41 AM

Can anyone help?
The only difference I noticed after a glance is that .net 4 resource files use difference version of ResXResourceReader in a resheader of the file:
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
Instead of
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>

Is this correct? Anybody noticed something else?

wrote Jan 10, 2011 at 2:16 PM

wrote Aug 7, 2011 at 5:03 PM

R0kR wrote Aug 7, 2011 at 5:38 PM

Hi!

The cause of load failure is in ResXResourceBundleAdapter.Resx2ResourceSet where the ResXResourceReader class is used for reading the resource file. Upgrading ResEx project to .net 4 and rebuilding it, seems to help. My guess is, that upgrading all projects to .net4 would solve the support problem for .net 4.

chilversc wrote Oct 18, 2011 at 2:46 PM

Also .net 4 types won't load correctly in .net 2 (such as Bitmap) due to them trying to resolve to System.Drawing.Bitmap, System.Drawing, Version=4.0...

As a work around you can redirect the application to load using .net 4 since .net 4 is compatible with .net 2 applications, add the following to ResEx.exe.config after installing:
<startup><supportedRuntime version="v4.0"/></startup>

dmoor wrote Aug 24, 2012 at 9:23 PM

I took the latest source code (revision 61499) and did the following:
  • load it into VS2010
  • set all the projects to compile against .NET v4
  • changed one referenced assembly which caused a compile error 'System.ServiceModel.Web' to 'System.ServiceModel'
The problems I had loading Resx files in version 1.2 seem to be fixed in this version.

sebasbaumh wrote Nov 5, 2012 at 6:47 AM

I was able to use ResEx for .NET 4 files.
Therefore you need to port the solution and all projects to a Visual Studio version supporting .Net Framework 4 (e.g. I took Visual Studio 2010).
Then you need to change every project in the solution to use .NET Framework 4 as target framework and recompile the whole thing.
As a result you get a ResEx version able to read the new resource files.

wrote Nov 5, 2012 at 6:47 AM

wrote Feb 14, 2013 at 2:55 AM