Developer forum

Forum » Development » Tranformation files for itemtype xml documents

Tranformation files for itemtype xml documents

Lars Larsen
Reply

Hi,

I have a lot of item type definitions as xml documents in "/Files/System/Items". I use Visual Studio and SlowCheetah to run transformations on the item type xml documents. But Dynamicweb gives an error ("Object reference not set to an instance of an object.") if I try to go into the Management Center. I have figured out that the error is caused by the transformations files I have side by side with the item type xml documents in "/Files/System/Items". I know I could set it up so that I should do a publish of all my files in my Visual Studio project to another place on the file system and run the website from there. But I hate to publish all files if I have just changed a comma in for example a Razor template. I only want to publish all files if I have to publish changes to one of our staging servers. I don't want to publish if I make changes on my local development website. Any suggestions on how to handle this would be very appreciated. Could it be a solution that Dynamicweb would only look for xml documents named "ItemType_[name].xml" where name can't contain comma. My xml document with transformation are named "ItemType_[name].Test.xml" and "ItemType_[name].Release.xml"


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Lars

I don't know what transformations is... Can you store them in another folder maybe?

Nicolai

 
Lars Larsen
Reply

Hi Nicolai

Well I'm not sure if that's a solution that will work? Maybe I will give it a try. But for future projects I will go with the code first approch, to avoid the item type xml documents.

 
Nicolai Høeg Pedersen
Reply

Hi Lars

Code first approach will also create the XML files.

BR Nicolai

 
Lars Larsen
Reply

Hi Nicolai

I know but then I won't have the xml files in my source repository and therefore not in my Visual Studio project. Therefore I don't need to transform the xml files. This is done to make different versions of the xml files for different staging environments (dev, test, release). By using the Code First approach I will use config files to make different versions of the item types for different staging environments.

 

You must be logged in to post in the forum