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

Notification

Icon
Error

Munir
#1 Posted : Tuesday, October 12, 2010 2:06:09 PM(UTC)
Munir
Rank: Newbie

Groups: Member
Joined: 10/12/2010(UTC)
Posts: 1
Location: Aachen, Germany

Dear all,

I have a DSL-Tools project in which I need to create my own T4 tempalte. The header of the T4 file looks like this:

Code:

<#@ template debug="true" hostSpecific="true" inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" #>
<#@ Dsl processor="DslDirectiveProcessor" requires="fileName='DslDefinition.dsl'" #>

Unfortunately, I don't get any intelliense for the properties generated by the "Dsl" directive. I.e, I don't see the property "Dsl" in the intellisense window when I type "this". The code itself seems to work and output is generated:

Code:

<#= this.Dsl.Name #>


Am I missing some directives or settings here? Thank you for your help.

Regards,
Munir


PS: the whole file looks like this:

Code:

<#@ template debug="true" hostSpecific="true" inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" #>
<#@ Dsl processor="DslDirectiveProcessor" requires="fileName='DslDefinition.dsl'" #>
<#@ output extension=".txt" #>

<#= this.Dsl.Name #>

Edited by user Monday, April 4, 2011 1:09:53 PM(UTC)  | Reason: Not specified

tangible
#2 Posted : Sunday, October 17, 2010 12:29:51 PM(UTC)
Guest
Rank: Guest

Groups: Guest
Joined: 3/17/2009(UTC)
Posts: 1,084

Hi,

what you need to do is to add an assembly reference for the DSL MetaModel and then cast th variable this.Dsl to that metamodel like this:

<#@ Dsl processor="DslDirectiveProcessor" requires="fileName='..\Dsl\DslDefinition.dsl'" #>
<#@ template inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" #>
<#@ assembly name="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\DSL SDK\DSL Designer\10.0\Microsoft.VisualStudio.Modeling.Sdk.DslDefinition.10.0.dll"#>
<#@ output extension=".vsixmanifest" #>
<#
Microsoft.VisualStudio.Modeling.DslDefinition.Dsl Dsl = this.Dsl;

Dsl.<You get intellisense here>


#>

Thanks

Tim
Users browsing this topic
Guest
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.

Powered by YAF | YAF © 2003-2020, Yet Another Forum.NET
This page was generated in 0.084 seconds.

Authorization on the site

For an authorized user opens up new possibilities

Login

Password