This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Is there a tool to generate .cs code from .lsmodel? I mean the tool which does the same thing as VisualStudio(LightSpeed extension to VS), after developer makes changes to .lsmodel and saves them. Our context is like that: We have data format described in a separate format. We'd like to generate .lsmodel file from our data format (our generator) and then generate .cs (Lightspeed generator). All generation steps should be done on a build machine - without human intervention. |
|
|
Yes, the lsgen command line tool does this: see Help Topics > Modelling Tools > Command Line Tool or http://www.mindscapehq.com/Help/LightSpeed/Help%20Topics/Modelling%20Tools/CommandLine.html (scroll down to the bottom). Note lsgen emits a file per entity (to a specified output folder) instead of a single file like the VS integrated designer does. So your build process will need to ensure that all generated files are included in the build. |
|
|
Thank you for the information. I tried to use the tool, but it fails with the following message: Failed: Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (FileNotFoundException) I have VisualStudio10 installed, but I haven't got VS9. |
|
|
Additional question to the whole thread: Can lsgen generate migrations the same way as it is possible in VS? The reason is similar to generating .cs from .lsmodel. |
|
|
Unfortunately we had to choose one of VS2008 and VS2010 to depend on for loading .lsmodel files, and we chose VS2008. So you will need to have VS2008 installed to run lsgen for .lsmodel files. We will look at whether we can address this but I can't commit to a timeframe. No, lsgen cannot generate migrations. There is a tool, lsmigrate, which can run migrations from the command line, but there is no unattended *generation* of migrations, and no such feature is planned. |
|