Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to run Xomega from a command line
xomega
#1 Posted : Friday, July 1, 2011 5:35:19 PM(UTC)
xomega



The Xomega Project is based on the standard MSBuild architecture, which means that you can build the project using the MSBuild.exe and pass the model project file to it. This will run all the generators included in the build. If you're running it during a continuous integration build then you want to include only rerunable generators in the build.

To run all the generators included in build, you can use the following command line (note the \\ at the end):

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MyProject.Model.xomproj "/p:DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\\"

To run only a specific generator, you can use the following command line:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MyProject.Model.xomproj "/p:CurrentGenerator=Enumeration Constants" "/p:DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\\"

To run a generator against specific files only, you need to set the Selection property to a semicolon separated list of the paths to those files as follows:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MyProject.Model.xomproj "/p:CurrentGenerator=WCF Service Contracts" "/p:DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\\" "/p:Selection=C:\MyProject\MyProject.Model\myfile.xom"

You can even pass the generator arguments through a command line as properties for the MSBuild if you specify those properties as values for the generator's parameters.

For example, if you set the following value in the model project file for the WPF search form generator
Code:
<ListRowObject-param>$(WPFSearchRowObject)</ListRowObject-param>

then you can use the following command line to pass in the value of the list row object parameter:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MyProject.Model.xomproj "/p:CurrentGenerator=WPF Search Form" "/p:WPFSearchRowObject=MyRowObject" "/p:DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\\"

There is one gotcha though. Currently in order for it to work, you need to copy the Xomega license file to the location returned by the System.Windows.Forms.Application.CommonAppDataPath constant for the running process (MSBuild.exe), which is the following location on Win7 or Vista:
C:\ProgramData\Microsoft Corporation\Microsoft® .NET Framework\4.0.30319.1\Xomega3.lic
We will look into supporting ability to provide the location of the license file through the command line.
xomega
#2 Posted : Tuesday, November 8, 2011 7:26:29 PM(UTC)
xomega



Update: Since Xomega release 3.2 (or 2.2 for VS2008) you no longer need to copy the license file to a certain path. Instead, you can provide the path to your license file in the command line arguments as follows:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MyProject.Model.xomproj "/p:XomegaLicense=C:\My Folder\Xomega_VS2010_Full.lic" "/p:DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\\"
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.