compilation errors during deserialization of Effects ?

Aug 2, 2011 at 7:30 AM

Hi all,

Since the change set #60xx, I can't compile the "Samples" solution without generate 6 errors.

Could you help me to resolve that ?

Below are the list of errors :

Erreur 1 - There was an error while deserializing intermediate XML. Invalid string format. Expected a string in the format "X;Y". 

file: C:\Visual Studio 2010\Projects\nine-60696\Samples\Content\Effects\TerrainEffect.xml 

row: 11 col: 65 

project: Terrain

Erreur 2 - There was an error while deserializing intermediate XML. Invalid string format. Expected a string in the format "X;Y;Z". 

file : C:\Visual Studio 2010\Projects\nine-60696\Samples\Content\Effects\SkinnedEffect.xml 

row: 15 col: 101 

project: SkinnedModel

Erreur 3 - There was an error while deserializing intermediate XML. Invalid string format. Expected a string in the format "X;Y;Z". 

C:\Visual Studio 2010\Projects\nine-60696\Samples\Content\Effects\ShadowEffect.xml 

10 101 

ShadowMapping

Erreur 4 - There was an error while deserializing intermediate XML. Invalid string format. Expected a string in the format "X;Y;Z". 

C:\Visual Studio 2010\Projects\nine-60696\Samples\Content\Effects\NormalMappingEffect.xml 

16 101 

Materials

Erreur 5 - There was an error while deserializing intermediate XML. Invalid string format. Expected a string in the format "X;Y;Z". 

C:\Visual Studio 2010\Projects\nine-60696\Samples\Content\Worlds\BasicModelView.xml 

8 55 

Game

Erreur 6 - There was an error while deserializing intermediate XML. Invalid string format. Expected a string in the format "X;Y;Z". 

C:\Visual Studio 2010\Projects\nine-60696\Samples\Content\Effects\BasicDirectionalLight.xml 

10 101 

MultiPassLighting

Tanks

Ylu





Coordinator
Aug 3, 2011 at 6:23 AM

I cannot repro this error, which Xna and OS version are you using?

I think the error is basic saying that Xml assets needs to use the "X;Y;Z" format to represent Vector3D, while I am using space seperated format. You can change the "<SplatterTextureScale>16 16</SplatterTextureScale>" in TerrainEffect.xml into "<SplatterTextureScale>16;16</SplatterTextureScale>" and see if it works.

Aug 3, 2011 at 9:43 AM
yufeih wrote:

I cannot repro this error, which Xna and OS version are you using?

I think the error is basic saying that Xml assets needs to use the "X;Y;Z" format to represent Vector3D, while I am using space seperated format. You can change the "<SplatterTextureScale>16 16</SplatterTextureScale>" in TerrainEffect.xml into "<SplatterTextureScale>16;16</SplatterTextureScale>" and see if it works.


I'm using XNA 4.0 (4.0.20823), WindowsXP Pro SP3 and I'm using Visual Studio c# Express.

Replace the space by the ";" is not enough to work...

I will tell you if i find the clue.

ylu

Aug 3, 2011 at 2:39 PM

Hi,

I resolved my problem.

The "TextTemplatingFileGenerator" tools (used to generate code from text template files) intensively uses the function "ConvertToString()". This function don't take into account the linguistic configuration of the OS. In France (it's my case) , I use the ";" as list separator. So, the generated code presents a lot of line with ..."ConvertToString("1, 1, 1") which generate errors.

I changed "...ConvertToString("1, 1, 1") to "...ConvertToString("1; 1; 1") in Nine.Content.Model.Generated.cs, so it' works.

If i change the separator list in the configuration panel of Windows, it' works too.

Ylu

Coordinator
Aug 4, 2011 at 3:08 AM

Thanks for the follow up,

I'll be changing the text templates to use ConvertFrom/ToInvariantString instead that uses a culture independent format.