sharing .resx file between device and desktop?

  • Thread starter Thread starter casey chesnut
  • Start date Start date
C

casey chesnut

i have searched and found older posts about how they are
different formats and cannot be shared ... except when i
am looking at the VS .NET 2003 versions, the schemas look
exactly the same.

the only diff i see is the <resheader "reader"
and "writer" naming different types.

has anybody been able to share a resource file between
a .csproj (.NETfx) and a .csdproj (.NETcf) with VS .NET
2003?

Thanks
casey
 
i can take a full framework .resx file,
and drop it in a .NETcf project.
then i can ADD these XmlElements to it:

<resheader name="Reader">

<value>System.Windows.Forms.Design.CFResXResourceRe
ader, System.CF.Design, Version=7.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</resheader>
<resheader name="Writer">

<value>System.Windows.Forms.Design.CFResXResourceWr
iter, System.CF.Design, Version=7.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</resheader>

and it will build and run properly.

the problem is that the resource file will no longer work
in the full framework project with the extra stuff.
so it looks like a VS.NET problem to me,
and not a file format issue (schemas are identical).
have not tried building from the command line to confirm
this?
my current project is building from VS .NET, so it wouldnt
help me either way :(

Thanks
casey
 
The RESX formats are incompatible by design. Changing the RESX
reader/writer tags is actually not making them compatible, but bypassing
our check to ensure you have the right resx file for your target.

The compact framework needs resx files to contain the "designer" types so
that we can properly show our designer. These types are converted to the
proper device types when your project is compiled.

So, if you have a device resx file and manually change the header tags to
the desktop tags (ie "make" it compatible with desktop), then our
translation during compilation won't occur and you will get the wrong types
in your .resources.

If you have a desktop resx file and manually change the header tags to the
device tags (ie "make" it compatible with netcf), then our designer will
not recognize the types and will likely not display.

Our next version will have a much better story for compatibility, but you
should know that device resx files will _NOT_ be compatible with desktop
files in the near future because the allowed serialized types will be
different. The compact framework only allows a fixed number of types to be
binary serialized, whereas the desktop is fully extensible. Therefore,
taking a desktop resx file will almost always cause a problem.

Porting from desktop to device app is definitely something we are looking
to improve, however.

-Ben

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "casey chesnut" <[email protected]>
| Sender: "casey chesnut" <[email protected]>
| References: <[email protected]>
| Subject: sharing .resx file between device and desktop?
| Date: Mon, 21 Jul 2003 11:23:29 -0700
| Lines: 48
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNPtS8+gkFsBMlHT3Ctl8DarnLbHA==
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:28716
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| i can take a full framework .resx file,
| and drop it in a .NETcf project.
| then i can ADD these XmlElements to it:
|
| <resheader name="Reader">
|
| <value>System.Windows.Forms.Design.CFResXResourceRe
| ader, System.CF.Design, Version=7.0.5000.0,
| Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
| </resheader>
| <resheader name="Writer">
|
| <value>System.Windows.Forms.Design.CFResXResourceWr
| iter, System.CF.Design, Version=7.0.5000.0,
| Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
| </resheader>
|
| and it will build and run properly.
|
| the problem is that the resource file will no longer work
| in the full framework project with the extra stuff.
| so it looks like a VS.NET problem to me,
| and not a file format issue (schemas are identical).
| have not tried building from the command line to confirm
| this?
| my current project is building from VS .NET, so it wouldnt
| help me either way :(
|
| Thanks
| casey
|
| >-----Original Message-----
| >i have searched and found older posts about how they are
| >different formats and cannot be shared ... except when i
| >am looking at the VS .NET 2003 versions, the schemas look
| >exactly the same.
| >
| >the only diff i see is the <resheader "reader"
| >and "writer" naming different types.
| >
| >has anybody been able to share a resource file between
| >a .csproj (.NETfx) and a .csdproj (.NETcf) with VS .NET
| >2003?
| >
| >Thanks
| >casey
| >.
| >
|
 
Back
Top