Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

ResXResourceReader and -Writer version insied .resx file

$
0
0

I have an Add-In for Visual Studio to support project localization. In some cases my Add-In adds new .resx files to a project. It creates the .resx files using a ResXResourceWriter object.

Inside the .resx file, there is a reference to both the ResXResourceReader and the ResXResourceWriter classes, specifying the full version.

<resheader name="reader"><value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><resheader name="writer"><value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader>

A user of my Add-In has run into a problem, because the version number of these two classes is incorrect for his application.

This happens because he is using Visual Studio 2010, but targeting .NET Framework 3.5. For Visual Studio 2010, my Add-In is compiled against Framework 4.0.

He finds, that if he changes 4.0.0.0 to 2.0.0.0, then everything is OK.

I presume that I can find out which version of the framework is being targeted. That is not the problem. My question is, how can I influence the version number written into the .resx file?

Am I going to have to have to use the ResXResourceWriter from Framework 3.5 to generate the .resx file, or is there some other way to do it.

If I have to use the ResXResourceWriter from Framework 3.5, how can I do this. Surely there will be a conflict with version from Framework 4.0. Would I have to use a separate AppDomain?

Thanks in advance
Phil


Viewing all articles
Browse latest Browse all 4410

Trending Articles