Can't Change Data Type on Data Contract Modeler

Topics: Service Factory Modeling Edition Forum
Nov 26, 2007 at 10:54 PM
Description Description is required
When using the Data Contract Modeler, I am unable to change the datatype of any member by using the Properties window. I get "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This is repeatable. It happens every time even after a reboot.

1. Create a Data Contract Model
2. Drag a Data Contract onto the model
3. Call it "Order"
4. Add Primitive Data type - call it "Id"
5. Attempt to change data type in Properties window

I have attached the two files. I cannot go any further. I need to do a demo Tuesday of this stuff and I cannot change any data types. I would appreciate any help. This is on Vista.
Developer
Nov 27, 2007 at 12:41 AM
Did you tried running DEVENV /SETUP from the "..\Microsoft Visual Studio 8\Common7\IDE" from within a command prompt that is started with "Run as Administrator" ?
Nov 28, 2007 at 10:29 PM
I also have hit issue. I am in windows xp sp2 and following the Hands On Labs on example 1 step 10.

i did run that command and still have the issue. Did you find a resolution for this?
Developer
Nov 28, 2007 at 10:52 PM
Did you installed all the pre requisites and "VS2005 SDK Feb 2007" as well? Btw, the dialog for the type picker is from WF (NET 3.0) so I assume you already got everything in place right?
Nov 29, 2007 at 8:35 AM
I'm havning the same problem after I installed Visual Studio 2008 - I've just reinstalled my machine with Vista, installed VS2005 and the factory worked fine. After I installed VS2008 I get the error "Attempted to read..." when trying to change datatype.
Nov 29, 2007 at 2:28 PM
a work around that i was able to use was to save the file and then edit it manually

when i saved it with notepad, vs asked to update it and then the object was of the type i needed.

so i had this line

<primitiveMessagePart name="Date" objectExtenderContainer="" isNullable="false" isCollection="false" />

and changed it to this and saved it

<primitiveMessagePart name="Date" objectExtenderContainer="" type="System.DateTime" isNullable="false" isCollection="false" />
Nov 29, 2007 at 11:51 PM
I have the same problem, and yes VS2008 RTM was installed. That tells me that not all is well in .net framework land.

When I was installing VSTS 2005 and the various GAT's, extensions, etc, one of them told me that I didn't have the .net Framework 3.0 installed (even though VS2008 is installed and runs fine against it, thanks). Turns out that Add/Remove programs shows that the .net Framework 3.0 Sp1 is the one that is installed. I can't install dotnetfx.exe for .net 3.0 because I get an error saying a newer version of the framework is already installed!! I also can't REMOVE the .net 3.0 framework sp1, as programs depend upon it, so it will refuse to uninstall.

Feels like the framework is painting me into a corner, and whatever state my machine (and some of yours ) is in, some things like changing the datatype in the property sheet is going to cause errors. DLL hell appears to be back with a vengeance.

Solution? Uninstall the latest, greatest VS2008 and wait for things to straighten themselves out?

Randy
Nov 30, 2007 at 11:10 PM
I uninstalled my VS2008, and .NET 3.5 and .NET 3.0 SP1
installed .NET 3.0, and then vs2008 again
and I still have that issue.

i found taking off vs2008 and .NET 3.5 releases that lock on .NET 3.0 SP1

but alas, the error still pops up so i am not really sure what else is doing this.
Developer
Nov 30, 2007 at 11:28 PM
You should be fine running VS2005 + NET 3.0 (No VS2008 whatsoever).
Dec 3, 2007 at 1:02 PM
Edited Dec 3, 2007 at 1:26 PM
It looks indeed like this issue is being caused by installing VS2008 RTM (side by side) on the same box. I'm also having this problem now and upto this point it was all working OK for me. Any chance of quick hotfix on this?

Note: This is not a Vista issue. I'm having this issue on a W2k3 system!

It's a bit of a shame. I was keeping VS2005 in my system only for WSSF and BizTalk until support for VS2008 becomes available. I'm wondering what I can/should do next.


charlyfriend wrote:
You should be fine running VS2005 + NET 3.0 (No VS2008 whatsoever).

Dec 5, 2007 at 4:49 PM
We're currently investigating this issue with 2005 and 2008 running side-by-side. As soon as we have more information it'll be posted here.

Ade
Developer
Dec 10, 2007 at 10:26 AM
This issue is actually being caused by VS2008 side by side and the current workarround is the one described by "atomriot" above.
This is, adding the "type" attribute to the required primitiveDataType or primitiveMessagePart.

<primitiveMessagePart name="Date" objectExtenderContainer="" type="System.DateTime" isNullable="false" isCollection="false" />
Jan 17, 2008 at 10:56 PM
Visual Studio 2008 installs Windows SDK 6.0.a. This error started to happen just after I have installed Visual Studio 2008 on a XP box with Visual Studio 2005, Visual Studio SDK v4 and the Web Service Software Factory. After install the XP box again only with Visual Studio 2005, Visual Studio SDK v4, WSSF, everything was working fine, until I installed Windows SDK v6.0.
Then this error started to pop when I tried to change at the data contract model the data type.

Uninstalling everything and then installing only Visual Studio 2005, Visual Studio SDK v4, WSSF won't help since the problem persist. That's why I decided to install XP OS from zero.
Jan 23, 2008 at 3:26 PM
I just got this error this morning too. I do not have VS 2008 installed, just 2005. I did install the Windows SDK on the 16th which failed mid process, but didn't think much about it at the time. I could swear I was able to modify contracts in between now and then, but maybe not. This seems to fit with previous observations about the SDK.
Developer
Jan 23, 2008 at 4:46 PM
Ruben,
Did you try with the current WSSF:ME CTP for VS2008? That should run fine with SDKv6.
Jan 23, 2008 at 5:24 PM
Edited Jan 24, 2008 at 8:19 PM


mctyler72 wrote:
I just got this error this morning too. I do not have VS 2008 installed, just 2005. I did install the Windows SDK on the 16th which failed mid process, but didn't think much about it at the time. I could swear I was able to modify contracts in between now and then, but maybe not. This seems to fit with previous observations about the SDK.

I really do not what to have to chime in with a "Me Too" message, but this happened to me today as well. Yesterday I was using this fine. I finished a large howto on integrating WSSF/WCSF/RF in projects and I was able to change the data type of a data contract with no problems. I came in this morning, opened up my actual work project, not the how to, and I add a model this morning, add a primitive data type and try to change the type, and I get the "DISPEMEMBERNOTFOUND" error.
I tried to remove the Model project from the solution, and create a new one, but I get the same results.

I just opened my howto project that was working yesterday, and I was able to change the data type of something that was already created.
I also added a new member and I was able to change the type.
I created a new Model Project solution, added the implementation projects, added a data contract, added a member and I was able to change the data type here as well.

I will keep testing and if I find anything, I will post here.

I do not have VS2008 installed, never have on this machine. I have the required extentions installed for WCSF/WSSF/RF installed. I am running on Windows XP.

UPDATE
OK, I got a previous version of my project from my TFS server and tried working with it, but that was unsucessful. I added a new Model Project, added a datacontract model, added a new object with a new property. I can not change the property data type. I changed the data type in the xml file and the type shows up with the corrected data type, but again I can not change it to anything else using the modeling tool.
I also tried to add the existing the working modeling project from my howto that I described above. In the failing solution, I can not change the data type of the property, but in the howto solution, I still can change the data types.

UPDATE
OK, something else is going on with the models and I am not sure if this is related, it probably is. I have resigned myself to having to change the data types by hand for now. But when I add a new data contract, I get an error stating "Project with GUID XXX does not exist", where XXX is an actual GUID. I will see if I can find any reference to this GUID that is assigned to this model project.

UPDATE
I am not sure if this will make a difference, but in a service contract model, I can not change the type of a "Primitive Message Part" using the IDE, but I CAN change the type of a "Data Contract Message Part".

Feb 1, 2008 at 10:55 AM
Edited Feb 1, 2008 at 10:56 AM
I have the same problem, i installed the vs2008. :(,

Hope there will be a solution to solve it.
Feb 1, 2008 at 11:00 AM


charlyfriend wrote:
This issue is actually being caused by VS2008 side by side and the current workarround is the one described by "atomriot" above.
This is, adding the "type" attribute to the required primitiveDataType or primitiveMessagePart.

<primitiveMessagePart name="Date" objectExtenderContainer="" type="System.DateTime" isNullable="false" isCollection="false" />


Hi charlyfriend, Did you mean edit the code directly, but how can i open those code document? i can' t find it.
Feb 1, 2008 at 2:48 PM
moplay,
You need to open the datacontract file with notepad. What file system directory did you put the service model project? In that directory, there will be another directory with the name of you service model project. Within the service model project directory there will be a file named XXX.datacontract, right click on this file and choose Open with. I used Notepad to edit the file, it is simply an XML file, you can use any XML editor you like.


moplay wrote:


charlyfriend wrote:
This issue is actually being caused by VS2008 side by side and the current workarround is the one described by "atomriot" above.
This is, adding the "type" attribute to the required primitiveDataType or primitiveMessagePart.

<primitiveMessagePart name="Date" objectExtenderContainer="" type="System.DateTime" isNullable="false" isCollection="false" />


Hi charlyfriend, Did you mean edit the code directly, but how can i open those code document? i can' t find it.

Developer
Feb 1, 2008 at 4:00 PM
You can open the model file with an XML Editor (right click and 'Open with..." option) and look for the above "primitiveMessagePart" element.
Feb 20, 2008 at 3:35 PM
We have the same problem and found out that type selector is not working when you add any type of project different from C# ( as DBproject, setup project). We removed those projects DB project and set up project and now is working.
Developer
Feb 20, 2008 at 5:55 PM
Thanks Ludwik, that's another known issue and will be fixed in the upcoming version of WSSF for VS2008.

Regards,
CF