Transforming templates on a build server

Hi,

I want to integrate our DSLs into our build process. We do not check in generated source code, and I want to do a "transform all templates" on the build server. I have tried things like

devenv /Command TextTransformation.TransformAllTemplates

but that leaves the IDE open.

does anybody know how I can do a "transform all templates" as part of a build server build ?

[578 byte] By [emgee] at [2008-1-7]
# 1

Hi,

The DSL Tools come with a little command line ‘tool’ called ‘DslTextTransform.cmd’ that can be used to transform text templates in a build process. You can find it in ‘..\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Tools\Bin’. You can find some more information about this tool and usage by using the search option for this forum.

FYI, we are currently writing an article about how to integrate your DSL development solution (also GAT Packages) in a team build scenario (including transform all templates actions). If I am correct, you are referring to a scenario where you include DSL models in a product development solution, so the scenario might be a little different but hopefully the article will add some value for your scenario as well. Hopefully the article will be ready for publication not too far from now J

For now, if you have any additional questions/issues about using the DslTextTransform.cmd, let us know and hopefully we are able to help you here.

Edward

EdwardBakker at 2007-10-2 > top of Msdn Tech,Visual Studio,Visual Studio Extensibility...
# 2
Thanks, that works nicely on my 32 bit machines, I have a problem on Vista 64 bit though, I get :

Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject, Version=8.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. An attempt was made to
load a program with an incorrect format.

(full text below)

It's in the GAC (in gac_32) so I'm not sure why the probe fails (I also tried copying the dlls into the TextTemplating\1.1, to no avail) . Does anybody have any ideas ?

Mark

"DslDirectiveProcessor!Microsoft.VisualStudio.Modeling.DslDefinition.DslDirectiveProcessor!Microsoft.VisualStudio.Modeling.Sdk.DslDefinition, Version=8.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" GeneratedCode\ConnectionBuilders.tt
error : Errors were generated when initializing the transformation object. The transformation will not be run. The following Exception was thrown:
System.BadImageFormatException: Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject, Version=8.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. An attempt was made to
load a program with an incorrect format.
File name: 'Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject, Version=8.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.VisualStudio.Modeling.Diagrams.CoreDesignSurfaceDomainModel.GetGeneratedDomainProperties()
at Microsoft.VisualStudio.Modeling.DomainModel.GetReflectionData(Type[]& domainModelTypes, DomainMemberInfo[]& properties, DomainRolePlayerInfo[]& roles)
at Microsoft.VisualStudio.Modeling.DomainModelReflector.ReflectDomainModel(DomainModelData data)
at Microsoft.VisualStudio.Modeling.DomainModelReflector.ReflectDomainModels(List`1 domainModelTypes)
at Microsoft.VisualStudio.Modeling.DomainModelReflector.ReflectModels(Store store, IEnumerable`1 domainModelTypes)
at Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation.Initialize()
at Microsoft.VisualStudio.TextTemplating56bfded5488643a2a49bbf493eeddc69.GeneratedTextTransformation.Initialize()
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(String fullClassName, String baseClas
sName, String[] importedNamespaces, String[] references, String source, String inputFile, Boolean debug, SupportedLanguages language, IFormatProvider format, ITextTemplatingEngineHost host, Boolean cacheAssemblies, String& result)

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable C:\Program Files (x86)\Common Files\Microsoft Shared\TextTemplating\1.1\TextTransform.exe
A detailed error log follows.

=== Pre-bind state information ===
LOG: User = ADERANT_AP\mark.greene
LOG: DisplayName = Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject, Version=8.2.0.0, Culture=neutral, PublicKey
Token=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Common Files/Microsoft Shared/TextTemplating/1.1/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.VisualStudio.Modeling.Sdk.Diagrams, Version=8.2.0.0, Culture=neutral, PublicKeyToken=b03f5f
7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject, Version=8.2.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Common Files/Microsoft Shared/TextTemplating/1.1/Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

emgee at 2007-10-2 > top of Msdn Tech,Visual Studio,Visual Studio Extensibility...

Visual Studio

Site Classified