setup 2.6.1 & LoadFromFile Method

Jan 25, 2009 at 11:30 PM
Edited Jan 26, 2009 at 12:06 AM
Hi, first of all, its a really nice addin so far.

However, I was not able to get the latest  setup to work in VS, compiling from source and defaulting CommandPreload=1 in addin assembly solved it.

I discovered some limitation for generated classes.

suppose you have a xsd like that...

[root]
[child] complex type [/child]
[/root]

however, each child is placed into a seperate xml file with the same schema...

[root]
[child] complex type record [/child]
[/root]



If I load from file, the collection get always nilled in a  for each loop.
I would be nice, if you could implement the behaviour of a typed dataset ...
If  loading from files with same schema, the records get added to collection rather than clearing/nilling the collection for each file.

Jan 25, 2009 at 11:32 PM
Edited Jan 26, 2009 at 12:05 AM
more specific, the xsd looks a bit shortened like this...

...
[element name="root"]
[complex type]
[choice]
[element name="child"]
[complex type]
[sequence]

[element name ="e1"]
[complex type]
[sequence]
[element] [/element]
... some more elements
[element] [/element]

[/sequence]
[/complex type]
[/element]

[element name ="e2"]
[complex type]
[sequence]
[element] [/element]
... some more elements
[element] [/element]
[/sequence]
[/complex type]
[/element]

[element name ="e3"]
[complex type]
[sequence]
[element] [/element]
... some more elements
[element] [/element]
[/sequence]
[/complex type]
[/element]




[/sequence]
[/complex type]
[/element]
[/choice]
[/complex type]



[/element]
...
...for dataset, MSDatasetGenerator puts some constraints here
...

Coordinator
Jan 26, 2009 at 2:15 PM
Hi,
Thanks for your post.
About setup can you give me more information ?.

I don't know if implement the behaviour of a typed dataset is possible.
Thank you for the idea, we'll think about it.
Pascal.
Feb 2, 2009 at 10:20 PM
Edited Feb 3, 2009 at 8:03 PM
Concerning the setup, it simply did not show up in VS 08 addin manager.
As I said, before I compiled the whole source, I made an adjustment in Addin project's Xsd2Code.AddIn.AddIn , setting CommandPreload=1 to default, rather than 0.
I then executed the setup, and everything was fine.
OS is Vista business.

If you could implement the mentioned behaviour, I could completely drop typed datasets in my project in favour for xsd2code.
Depending on the client setup, I am reading from one or multiple xml files with same schema.
Unfortunately, I would have to completely rewrite the data layer/file access, if I was to implent xsd2code.
However, dealing with just one file at time, its a matter of almost minutes to implement.  It works great and fast :)

Update: same problem with 2.8.1 setup... it does not show up in addin manager... trying to compile the source now... ah, it works again :)
This setup problem occurs on my PC at home as well as on PC at work. Both PC run Vista Business 32bit.
Cpu are different, but should not matter anyway. Work PC is member of a domain, but this does also not be the problem.

To summarize, I compiled the source, run setup and everything works. Only difference to your setup seems, I compiled it with the mentioned CommandPreload=1 in addin.addin

Feb 18, 2009 at 9:56 AM
I read in some other xsd2code thread, that someone had his home directory moved to a different location.
Well, my two PC also have their home directory not at default location, it is on a different partition.
This might be, what your setup.exe causing the "invisible" Addin, thought install runs fine.
If I recompile the source and make an install, everything works as intended.
Just a thought on fixing this.
Coordinator
Feb 23, 2009 at 8:16 PM

Thank you to have reported this bug.

I’ll try to fix it in the next release.

Pascal.

De : schildkroete [mailto:notifications@codeplex.com]
Envoyé : mercredi 18 février 2009 10:57
À : pascal.cabanel@free.fr
Objet : Re: setup 2.6.1 & LoadFromFile Method [Xsd2Code:45205]

From: schildkroete

I read in some other xsd2code thread, that someone had his home directory moved to a different location.
Well, my two PC also have their home directory not at default location, it is on a different partition.
This might be, what your setup.exe causing the "invisible" Addin, thought install runs fine.
If I recompile the source and make an install, everything works as intended.
Just a thought on fixing this.

Read the full discussion online.

To add a post to this discussion, reply to this email (Xsd2Code@discussions.codeplex.com)

To start a new discussion for this project, email Xsd2Code@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com