Service Factory Modeling Edition Issue

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

If you installed VSTS2008 and VSTS2005 side-by-side, you may notice that it is not possible to change the type of the primitiveType. If you press the button image , you may get following error:

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt".

image

To illustrate the problem take a look on the type Item. If you add primitive property ItemID and try to change the type to something else than System.String the error shown above will be popped up. Note that tdefault type is always System.String.

image

This problem is known to Patterns & Practices team and they are working on the solution. In the mean time, I would recommend following workaround. Save the designer file *(.dta Contract or .servicecontract file) and open it with XML editor. Then look for the node dataContract with the name of your contract (in this example TItem.).

<dataContract Id="87931c93-8908-421b-9276-fe578f54781b"
             
objectExtenderContainer=""
             
name="Item"
             
namespace=http://daenet.eu/xsylon>

 

      <dataContractCollections>
        <dataContractCollectionMoniker Id="1b0f8c93-708b-48ee-962c-42e1f25ce7ed" />    
      </
dataContractCollections>

 

      <dataMembers>
        <primitiveDataType
                           
objectExtenderContainer=""
                           
name="ItemID"
                           
type="System.Guid"
                           
collectionType=""
                           
isNullable="false" />
      </dataMembers>
</dataContract>

Go to datamembers collection node and append the attribute type set to any system type you want. Save the file and open it in designer as usual. All will work fine.

 


Posted Jan 18 2008, 06:13 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.