<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Jean-Marc Prieur's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jmprieur/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jmprieur/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:13:45 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>We re-released the VsVmSdk for Visual Studio 2012 RTM</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/we-re-released-the-vsvmsdk-for-visual-studio-2012-rtm</link>
      <pubDate>Mon, 24 Sep 2012 03:07:48 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2012/09/24/we-re-released-the-vsvmsdk-for-visual-studio-2012-rtm/</guid>
      <description><![CDATA[Last Friday, we have re-release the VsVmSdk that was originally released on 8/15. The new version of...]]></description>
      <content:encoded><![CDATA[<p><span style="color:#333333; font-family:Segoe UI; font-size:9pt">Last Friday, we have re-release the VsVmSdk that was originally released on 8/15. The new version of the file is 11.0.50727.01, which is lower than the previously released file (11.0.50727.03). This is by design. 
</span></p><p><span style="color:#333333; font-family:Segoe UI; font-size:9pt"><br/><strong>Note</strong>: installing this software requires uninstalling the previously installed versions of this software.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Error Migrating some DSL solutions to Visual Studio 2012</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/error-migrating-some-dsl-solutions-to-visual-studio-2012</link>
      <pubDate>Tue, 14 Aug 2012 04:38:55 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2012/08/14/error-migrating-some-dsl-solutions-to-visual-studio-2012/</guid>
      <description><![CDATA[As you may know, it is possible to migrate a DSL Project to the current version of Visual Studio...]]></description>
      <content:encoded><![CDATA[<p>As you may know, it is possible to migrate a DSL Project to the current version of Visual Studio using DslProjectMigrationTool.exe which is available from the Visualization and Modeling SDK. This is no exception for Visual Studio 2010, where the tool can be found under <em>Microsoft Visual Studio 11.0</em>\VSSDK\VisualStudioIntegration\Tools\DSLTools with <em>Microsoft Visual Studio 11.0</em> is the installation folder for Visual Studio 2012</p>  <p>I has been reported that, in rare cases, some migrated DSL projects may exhibit the following issue: the DSL package project does not compile due to an error in the DslPackage\GeneratedCode\Package.cs file caused by an undeclared namespace alias</p>  <p>There is an easy workaround:</p>  <ul>   <li>open the file DslPackage\GeneratedCode\DslPackage.tt</li>    <li>replace the single occurrence of the text string &quot;VSTextTemplatingHost::&quot; with &quot;global::Microsoft.VisualStudio.TextTemplating.VSHost.&quot;</li>    <li>run the custom tool to regenerate the Package.cs file.</li> </ul>  <p>The project will then build correctly.</p>]]></content:encoded>
    </item>
    <item>
      <title>What is new in Visual Studio 2012 RC Visualization and Modeling SDK ?</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/what-is-new-in-visual-studio-2012-rc-visualization-and-modeling-sdk</link>
      <pubDate>Tue, 05 Jun 2012 04:07:40 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2012/06/05/what-is-new-in-visual-studio-2012-rc-visualization-and-modeling-sdk/</guid>
      <description><![CDATA[Last week, we shipped the VsVm SDK RC (Visual Studio 2012 RC Visualization and Modeling SDK). Here...]]></description>
      <content:encoded><![CDATA[<p>Last week, we shipped the VsVm SDK RC (<a href="https://code.msdn.microsoft.com/vsvmsdk">Visual Studio 2012 RC Visualization and Modeling SDK</a>). Here is what is new with respect to VsVmSDK Beta:</p>  <h3>DSL Tools</h3>  <ul>   <li>We fixed a few bugs in the runtime, in particular, adding an element to a compartment shape could select the previous element instead of the newly added element when the compartment mapped to a derived relationship, which was incorrect.</li>    <li>We updated the DslProjectMigrationTool used to migrate VS2010 DSL Tools solutions to Visual Studio 2012. It is still located under </li>    <li>There is a slight API change in in Microsoft.VisualStudio.Modeling.Sdk.Integration.dll: the <strong><a href="https://msdn.microsoft.com/fr-fr/library/microsoft.visualstudio.modeling.integration.picker.imodelbrowserhost(v=vs.110).aspx">IModelBrowserHost</a></strong> interface has a new member <a href="https://msdn.microsoft.com/fr-fr/library/microsoft.visualstudio.modeling.integration.picker.imodelbrowserhost.resizetomeasure(v=vs.110).aspx">ResizeToMeasure</a>. This interface is implemented by the <strong>PickerDialog</strong>, as a User Interface for the modelbus references. We don’t think that anybody has really implemented this interface apart from us for the TFS workitem linking to models and <a href="https://msdn.microsoft.com/en-us/library/dd465152(v=vs.110).aspx">model elements</a>, so we don’t think that this really break anybody. But I preferred to mention it.</li>  </ul>  <h3>Architecture designers extensibility</h3>  <ul>   <li>We have fixed UML designers project template VSIX following-up a change in the VSSDK, </li>    <li>We have added the Layer diagram extensibility project templates. See <a href="https://msdn.microsoft.com/en-us/library/ff657803(v=vs.110)">Extending Layer Diagrams</a></li>  </ul>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <h3>Code Index SDK</h3>  <ul>   <li>The code index SDK has a <strong>new loader indexing PDB files.</strong> it retrieves source file, and line number for methods body, and the method calls.</li>    <li>the <strong>schema</strong> of the code index has slightly changed:</li>    <ol>     <li>addition of the source file and line information (to store the information of the PDBs)</li>      <li>In Beta, <strong>Events</strong> were linked to Method definitions by AddMethodDefintion and RemoveMethodDefinition. Now there are <strong>MethodDefinitions</strong> (collection)</li>      <li>In Beta <strong>Properties</strong> were linked to MethodDefinition through GetMethodDefinition and SetMethodDefinition. Now there is a collection of assessors named <strong>AccessorMethodDefinitions</strong></li>   </ol>    <li>We have, therefore, <strong>updated the </strong><a href="https://code.msdn.microsoft.com/site/search?query=&amp;f%5B1%5D.Value=&amp;f%5B1%5D.Type=SearchText&amp;f%5B0%5D.Value=11.0&amp;f%5B0%5D.Type=VisualStudioVersion&amp;f%5B0%5D.Text=Visual%20Studio%202012%20RC&amp;f%5B2%5D.Value=Code%20Index&amp;f%5B2%5D.Type=Technology&amp;f%5B2%5D.Text=Code%20Index&amp;ac=8"><strong>code index samples</strong></a>. In particular if you <a href="https://blogs.msdn.com/b/visualstudioalm/archive/2012/03/15/the-code-index-sdk-part-2-bulk-indexing-assemblies-into-the-code-index.aspx">bulk index</a> assemblies, the PDB will be indexed, and you will get source and line information in the <a href="https://code.msdn.microsoft.com/Code-Index-How-to-discover-e2d54475">IgnoredTests</a> sample</li>    <li>We have added a <strong>new sample</strong> dumping to text files the public API of indexed assemblies (See <a href="https://code.msdn.microsoft.com/Code-Index-How-to-discover-98ba517b">How to discover and output the public API of an assembly</a>).</li>    <li>The code index <strong>database</strong>, which used to be named Repository is now named <strong>Microsoft.VsCodeIndex</strong>, to avoid collisions with user databases.</li>    <li>We have changed the msbuild property name describing the name of the database when <a href="https://blogs.msdn.com/b/visualstudioalm/archive/2012/03/15/the-code-index-sdk-part-2-bulk-indexing-assemblies-into-the-code-index.aspx">bulk indexing</a> assemblies, it used to be named RepositoryDb and is now named <strong>Repository</strong> its default value was also changed to <strong>Microsoft.VsCodeIndex</strong>.</li>  </ul>]]></content:encoded>
    </item>
    <item>
      <title>What is new with T4 in Visual Studio 11 Beta?</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/what-is-new-with-t4-in-visual-studio-11-beta</link>
      <pubDate>Tue, 03 Apr 2012 00:28:55 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2012/04/03/what-is-new-with-t4-in-visual-studio-11-beta/</guid>
      <description><![CDATA[In case you missed it, Gareth just blogged about what’s new with T4. As you know T4 is independent...]]></description>
      <content:encoded><![CDATA[<p>In case you missed it, Gareth just <a href="https://blogs.msdn.com/b/t4/archive/2012/04/03/what-s-new-with-t4-in-visual-studio-11-beta.aspx">blogged</a> about what’s new with T4. As you know T4 is independent on the DSL Tools, but widely used by them.</p>]]></content:encoded>
    </item>
    <item>
      <title>More about the Code Index SDK</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/more-about-the-code-index-sdk</link>
      <pubDate>Tue, 13 Mar 2012 07:57:54 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2012/03/13/more-about-the-code-index-sdk/</guid>
      <description><![CDATA[If you were waiting for more information about the code index SKD, please know that I’ve continued...]]></description>
      <content:encoded><![CDATA[<p>If you were waiting for more information about the code index SKD, please know that I’ve continued blogging about it on the <a href="https://blogs.msdn.com/visualstudioalm/">visualstudioalm</a> blog : <a title="https://blogs.msdn.com/b/visualstudioalm/archive/tags/code+index/" href="https://blogs.msdn.com/b/visualstudioalm/archive/tags/code+index/">https://blogs.msdn.com/b/visualstudioalm/archive/tags/code+index/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>What is the code index SDK?</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/what-is-the-code-index-sdk</link>
      <pubDate>Thu, 01 Mar 2012 04:45:51 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2012/03/01/what-is-the-code-index-sdk/</guid>
      <description><![CDATA[The Dependency Graphs in Visual Studio Ultimate are much more scalable …  In Visual Studio 2010, we...]]></description>
      <content:encoded><![CDATA[<h3>The Dependency Graphs in Visual Studio Ultimate are much more scalable …</h3>  <p>In Visual Studio 2010, we released the Dependency diagrams, which enabled you to <a href="https://msdn.microsoft.com/en-us/library/dd409365(v=vs.110).aspx">visualize</a> the dependencies between assemblies, namespaces, types or members through directed graphs. In Visual Studio 11 Ultimate, the experience around these <a href="https://msdn.microsoft.com/en-us/library/dd409453(v=vs.110).aspx">architecture diagrams</a> has improved a lot. There are many goodies, among which a fantastic incremental layout, and the possibility to do some diagram touch-up ; we’ll discuss the features in details in the next coming days/weeks. But what you will probably immediately notice is that now, when you use <b>Architecture | Generate Dependency Graphs | For solution</b>, you’ll be able to generate a dependency diagram for really huge Visual Studio solutions. We have considerably improved the performance and even more importantly the scalability of the Dependency graphs. However, that’s probably not the only way you’ll want to understand existing code : you will also want to start from a particular code element you are interested in. This is why we also enabled you to <b>create diagrams from a selection in the solution explorer</b> (we added a drop-down button in the solution explorer toolbar that show-up when you select code elements to “graph” those), and then ask questions from the representations of the code elements in the diagram (using the <b>Show |</b> contextual menu on the nodes of the graph), or pivots in the solution explorer.</p>  <h3>… because they are queried from the code index</h3>  <p>At the heart of these scalability and performance improvements, is the <b>code index</b>. Each time a diagram representing code elements is built, the corresponding assemblies are indexed in the code index (if they need to be). The code index is then used as a cache to query all the needed information. In the Architecture diagrams, the information which is indexed is limited to what is in the solution, but it is also possible to pre-populate the cache using build tasks that we released part of the <a href="https://blogs.msdn.com/b/jmprieur/archive/2012/03/01/announcing-the-visual-studio-11-beta-visualization-and-modeling-sdk.aspx">VsVmSdk</a>. It is also possible to leverage the information which is in the cache, as well as to create new contextual queries. </p>  <h3>The code index SDK</h3>  <p>The code index SDK gives you the opportunity to control the indexing, and to access the data which is in the cache. In the next few days, I’ll explain more about code index SDK.</p>  <p>Meanwhile, have fun with Visual Studio 11 Beta, and stay tuned !</p>]]></content:encoded>
    </item>
    <item>
      <title>Announcing the Visual Studio 11 Beta Visualization and Modeling SDK</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/announcing-the-visual-studio-11-beta-visualization-and-modeling-sdk</link>
      <pubDate>Thu, 01 Mar 2012 04:39:11 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2012/03/01/announcing-the-visual-studio-11-beta-visualization-and-modeling-sdk/</guid>
      <description><![CDATA[After we released the&#160; Visual Studio 11 Beta (along with the Visual Studio 11 Beta SDK)...]]></description>
      <content:encoded><![CDATA[<p>After we released the&#160; <a href="https://blogs.msdn.com/b/jasonz/archive/2012/02/29/welcome-to-the-beta-of-visual-studio-11-and-net-framework-4-5.aspx">Visual Studio 11 Beta</a> (along with the Visual Studio 11 Beta SDK) yesterday morning, I’m excited to announce the availability, of the <a href="https://www.microsoft.com/download/en/details.aspx?id=29040">Visual Studio 11 Beta Visualization and Modeling SDK</a> (VsVmSdk).</p>  <p>As in Visual Studio 2010, this SDK still contains the DSL Tools, and an updated migration tool for your DSLs, and the build rules used to integrate T4 code generation to a build. It still contains the project templates that you can use to extend the UML designers of Visual Studio Ultimate. But it also contains a new component : the Visual Studio Ultimate <strong><a href="https://blogs.msdn.com/b/jmprieur/archive/2012/03/01/what-is-the-code-index-sdk.aspx">code index SDK</a></strong></p>  <h5>Where can I find Samples and Documentation?</h5>  <p>For samples and pre-release documentation, please visit the following page on Code Gallery: <a href="https://code.msdn.microsoft.com/vsvmsdk">https://code.msdn.microsoft.com/vsvmsdk</a>. We will progressively post samples <a href="https://code.msdn.microsoft.com/vsvmsdk">there</a> about the new feature.</p>]]></content:encoded>
    </item>
    <item>
      <title>How to get a unique name for connectors across a whole model?</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/how-to-get-a-unique-name-for-connectors-across-a-whole-model</link>
      <pubDate>Mon, 07 Feb 2011 01:44:00 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2011/02/07/how-to-get-a-unique-name-for-connectors-across-a-whole-model/</guid>
      <description><![CDATA[Joeul asks an interesting question in his forum post. reference relationships' names are not...]]></description>
      <content:encoded><![CDATA[<p>Joeul asks an interesting question in his forum <a href="https://social.msdn.microsoft.com/Forums/en-US/dslvsarchx/thread/a57a1b93-999f-472e-891d-becd71a203ff">post</a>. reference relationships' names are not normally unique across the whole model, but only to the 2 elements they link. How to change this behavior?</p>  <p>Here is how to do to get unique name for reference relationships across the model. This is also the opportunity of explaining how to use the Name providers.</p>  <p>Let’s suppose that I have a simple DSL named “GloballyUniqueRelationshipName” which I unfolded from a Minimal language:</p>  <ol>   <li>Add a <font face="CordiaUPC"><strong>Name</strong></font> property (of type String) to the ExampleElementReferencesTargets Relationship </li>    <li>Set the <strong>IsElementName</strong> property of this Name domain property to True (using the property window) </li>    <li>In the DSL explorer, set the <strong>UseFullForm</strong> property of the ExampleElementReferencesTargets serialization under the ExampleElement in the Xml Serialization behavior to true (because now our relationship has domain properties) as shown on the picture below:<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/61/metablogapi/5808.image_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-01-61-metablogapi/5808.image_5F00_2.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/61/metablogapi/2656.image_thumb.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-01-61-metablogapi/2656.image_5F00_thumb.png" width="460" height="674" /></a>       <br /></li>    <li>In the DSL project, add a custom code folder in which you will add a new class named <span style="color: "><font color="#2b91af">MyNameProvider</font></span>, with the following content:       <br />      <br />      <pre style="list-style-type: disc; font-family: "><font face="Consolas"><span style="color: "><font color="#0000ff">using</font></span> System;<br /><span style="color: "><font color="#0000ff">using</font></span> System.Collections.Generic;<br /><span style="color: "><font color="#0000ff">using</font></span> System.Linq;<br /><span style="color: "><font color="#0000ff">using</font></span> Microsoft.VisualStudio.Modeling;<br /> <br /><span style="color: "><font color="#0000ff">namespace</font></span> Company.GloballyUniqueRelationshipName<br />{<br />&#160;<span style="color: "><font color="#808080">///</font></span><span style="color: "><font color="#008000">&#160;</font></span><span style="color: "><font color="#808080">&lt;summary&gt;</font></span><br />&#160;<span style="color: "><font color="#808080">///</font></span><span style="color: "><font color="#008000"> Custom name provider that ensures that every link instance has a unique name</font></span><br />&#160;<span style="color: "><font color="#808080">///</font></span><span style="color: "><font color="#008000">&#160;</font></span><span style="color: "><font color="#808080">&lt;/summary&gt;</font></span><br />&#160;<span style="color: "><font color="#0000ff">internal</font></span>&#160;<span style="color: "><font color="#0000ff">class</font></span>&#160;<span style="color: "><font color="#2b91af">MyNameProvider</font></span> : <span style="color: "><font color="#2b91af">ElementNameProvider</font></span><br /> {<br />&#160; <span style="color: "><font color="#0000ff">public</font></span>&#160;<span style="color: "><font color="#0000ff">override</font></span>&#160;<span style="color: "><font color="#0000ff">void</font></span> SetUniqueName(<span style="color: "><font color="#2b91af">ElementLink</font></span> link, <span style="color: "><font color="#2b91af">DomainRoleInfo</font></span> indexingDomainRole, <span style="color: "><font color="#0000ff">string</font></span> baseName)<br />&#160; {<br />&#160;&#160; <span style="color: "><font color="#0000ff">if</font></span> (link == <span style="color: "><font color="#0000ff">null</font></span>)<br />&#160;&#160; {<br />&#160;&#160;&#160; <span style="color: "><font color="#0000ff">throw</font></span>&#160;<span style="color: "><font color="#0000ff">new</font></span>&#160;<span style="color: "><font color="#2b91af">ArgumentNullException</font></span>(<span style="color: "><font color="#a31515">&quot;link&quot;</font></span>);<br />&#160;&#160; }<br /> <br /> <br />&#160;&#160; baseName = <span style="color: "><font color="#a31515">&quot;MyBaseName&quot;</font></span>;<br /> <br />&#160;&#160; <span style="color: "><font color="#2b91af">IDictionary</font></span>&lt;<span style="color: "><font color="#0000ff">string</font></span>, <span style="color: "><font color="#2b91af">ModelElement</font></span>&gt; allSiblings = link.Store.ElementDirectory.FindElements(link.GetDomainClass())<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .Where(l =&gt; l != link)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .ToDictionary(l =&gt; l.GetDomainClass().NameDomainProperty.GetValue(l).ToString());<br /> <br /> <br />&#160;&#160; <span style="color: "><font color="#0000ff">if</font></span> (<span style="color: "><font color="#0000ff">this</font></span>.DomainProperty.PropertyType == <span style="color: "><font color="#0000ff">typeof</font></span>(<span style="color: "><font color="#0000ff">string</font></span>))<br />&#160;&#160; {<br /> <br />&#160;&#160;&#160; <span style="color: "><font color="#0000ff">this</font></span>.SetUniqueNameCore(link, baseName, allSiblings);<br />&#160;&#160; }<br />&#160;&#160; <span style="color: "><font color="#0000ff">else</font></span><br />&#160;&#160; {<br />&#160;&#160;&#160; <span style="color: "><font color="#0000ff">this</font></span>.CustomSetUniqueNameCore(link, baseName, link.Store.ElementDirectory.FindElements(link.GetDomainClass()));<br />&#160;&#160; }<br /> <br />&#160; }<br /> }<br />}<br /></font><br /></pre>
  </li>

  <li>In the DSL Explorer, add a new external type (right clicking on the root node), named <span style="color: "><font color="#2b91af">MyNameProvider</font></span> and of namespace Company.GloballyUniqueRelationshipName 

    <br />

    <br /></li>

  <li>Change the <strong>ElementNameProvider</strong> property of the Name domain property of your ExampleElementReferencesTargets to <span style="color: "><font color="#2b91af">MyNameProvider</font></span>&#160; <br />

    <br /></li>

  <li>You are done! 
    <br />If you run your DSL in the experimental hive, the links you will create will be named “MyBaseName1”, “MyBaseName2”, and so on. 

    <pre style="font-family: ">&#160;</pre>
  </li>
</ol>

<p>Note that this sample can be improved to apply this processing to links of a given class only (here we apply it to every links) </p>]]></content:encoded>
    </item>
    <item>
      <title>New improved documents and sample available</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/new-improved-documents-and-sample-available</link>
      <pubDate>Fri, 27 Aug 2010 13:52:07 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2010/08/27/new-improved-documents-and-sample-available/</guid>
      <description><![CDATA[If you don’t know it already, you’ll be pleased to learn that Alan has posted yesterday a news on...]]></description>
      <content:encoded><![CDATA[<p>If you don’t know it already, you’ll be pleased to learn that Alan has posted yesterday a news on the VsVmSdk forum about the documentation improvements for the DSL Tools.</p>  <p><a href="https://social.msdn.microsoft.com/Forums/en-US/dslvsarchx/thread/f4b5561a-c55e-459a-8e80-2eba2b57f45f">New improved documents and sample available</a><a href="https://social.msdn.microsoft.com/Forums/en-US/dslvsarchx/thread/f4b5561a-c55e-459a-8e80-2eba2b57f45f?outputAs=rss"><img src="https://i2.social.microsoft.com/Forums/resources/images/trans.gif?cver=607%0d%0a" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Working around a bug in the ProvideCodeGeneratorAttribute</title>
      <link>https://docs.microsoft.com/archive/blogs/jmprieur/working-around-a-bug-in-the-providecodegeneratorattribute</link>
      <pubDate>Thu, 03 Jun 2010 00:23:43 GMT</pubDate>
      <dc:creator><![CDATA[Jean-Marc Prieur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jmprieur/2010/06/03/working-around-a-bug-in-the-providecodegeneratorattribute/</guid>
      <description><![CDATA[Summary  There is a bug in the ProvideCodeGeneratorAttribute, which breaks VSIX deployment because...]]></description>
      <content:encoded><![CDATA[<h3><strong>Summary</strong></h3>  <p>There is a bug in the ProvideCodeGeneratorAttribute, which breaks VSIX deployment because it generates absolute codebase in .pkgdef instead of Codebase relative to $PackageFolder$. This bug can be worked-around by not using the ProvideCodeGeneratorAttribute but adding a second pkgdef file in your project with the information that this attribute would generate</p>  <p>&#160;</p>  <h3><strong>The problem</strong></h3>  <p>Here is how to repro this problem:</p>  <div class="page-box" jquery1275547907415="12">   <div id="item-details" jquery1275547907415="16">     <div id="dialog">       <table class="details-body" border="0" cellspacing="0" cellpadding="0"><tbody>           <tr>             <td>               <p style="line-height: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class="MsoNormal"><span style="font-size: 10pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri; mso-fareast-language: en-gb">1. Create a DSL (for instance, in fact we need a package). (Company: CompanyName, Language name: LanguageName, extension .myLanguage)</span></p>                <p style="line-height: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class="MsoNormal"><span style="font-size: 10pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri; mso-fareast-language: en-gb"></span>                  <p></p>               </p>                <p></p>                <p style="line-height: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class="MsoNormal"><span style="font-size: 10pt; mso-ascii-font-family: calibri; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri; mso-fareast-language: en-gb">2. In the DslPackage project, add a partial implementation for the Package providing a code generator (for instance:) </span>                  <p></p>               </p>                <p></p>                <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: gray; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span>///</span><span style="font-family: consolas; color: green; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"> </span><span style="font-family: consolas; color: gray; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&lt;summary&gt;</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span><span style="color: gray">///</span><span style="color: green"> Declaration of a partial of the package providing the code generator</span></span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;/summary&gt;</span></span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span>[<b><span style="background: #ffff66; color: #2b91af">ProvideCodeGenerator</span></b>(<span style="color: blue">typeof</span>(<span style="color: #2b91af">MyCodeGenerator</span>), <span style="color: #a31515">&quot;MyCodeGenerator&quot;</span>, <span style="color: #a31515">&quot;Custom tool that generates C# files based on .xxx files&quot;</span>, <span style="color: blue">true</span>)]</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span><span style="color: blue">partial</span> <span style="color: blue">class</span> <span style="color: #2b91af">MyEditorPackage</span></span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span>{</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span>}</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"> </span>                  <p></p>               </p>                <p></p>                <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160;</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"> </span>                  <p></p>               </p>                <p></p>                <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;summary&gt;</span></span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">                    <br />&#160;</span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="color: gray">///</span><span style="color: green"> Code generator itself</span></span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span><span style="color: gray">///</span><span style="color: green"> </span><span style="color: gray">&lt;/summary&gt;</span></span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span>[<span style="color: #2b91af">Guid</span>(<span style="color: #a31515">&quot;38BF483F-F6AC-468C-8826-C7DDF6ECED98&quot;</span>)]</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span><span style="color: blue">public</span> <span style="color: blue">class</span> <span style="color: #2b91af">MyCodeGenerator</span>: <span style="color: #2b91af">TemplatedCodeGenerator</span></span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;</span>{</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160; </span><span style="color: blue">protected</span> <span style="color: blue">override</span> <span style="color: blue">byte</span>[] GenerateCode(<span style="color: blue">string</span> inputFileName, <span style="color: blue">string</span> inputFileContent)</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160; </span>{</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160;&#160; </span><span style="color: blue">return</span> base.GenerateCode(inputFileName, inputFileContent);</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><span style="mso-spacerun: yes">&#160; </span>}</span><span style="font-family: &#39;Times New Roman&#39;,&#39;serif&#39;; font-size: 12pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb">&#160; <br /></span><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb; mso-ansi-language: en-gb; mso-bidi-language: ar-sa"><span style="mso-spacerun: yes">&#160;</span>}</span> </p>             </td>           </tr>         </tbody></table>     </div>   </div> </div>  <p>&#160;</p>  <p>When you build your package, the <span style="font-family: consolas; font-size: 9.5pt; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: en-gb"><b><span style="background: #ffff66; color: #2b91af">ProvideCodeGenerator</span></b></span>&#160; attribute will generate some registration information for Visual Studio to take your custom tool into account. However, because of the bug, it generates a Codebase in the .pkgdef file which is absolute:</p>  <p>&quot;CodeBase&quot;=&quot;<a href="file:/// ... path on dev machine ... /DslPackage/bin/Debug/My.DslPackage.dll">file:/// ... path on dev machine ... /DslPackage/bin/Debug/My.DslPackage.dll</a>&quot;     <br /></p>  <p>instead of relative to the $PackageFolder$</p>  <p>&quot;CodeBase&quot;=&quot;$PackageFolder$\My.DslPackage.dll&quot;</p>  <p>&#160;</p>  <p>thus preventing the code generator being deployed by VSIX (which would work if the registration attribute generated a codebase relative to $PackageFolder$ in the .pkgdef)</p>  <p>&#160;</p>  <h3>Workaround</h3>  <p>Happily, a package can have several pkgdef files. The idea of the workaround is, in the DslPackage project, to add a new file named “CodeGenerator.pkgdef”, and ensure the following properties in the solution explorer for this file:   <br />- Set Build Action to Content,    <br />- Set Copy to Output directory to Copy if newer    <br />- Set Include in VSIX to true</p>  <p>The content of the file must be something like the following (replacing the name of the custom tool its GUID, its comment, the class name for the custom tool, and the assembly name)</p>  <p>[$RootKey$\Generators]   <br /> [$RootKey$\Generators\{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}]     <br />[$RootKey$\Generators\{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}\<strong>MyCodeGenerator</strong>] @=&quot;<strong>Custom tool that generates C# files based on .xxx files</strong>&quot;     <br />&quot;CLSID&quot;=&quot;{<strong>38BF483F-F6AC-468C-8826-C7DDF6ECED98</strong>}&quot;     <br />&quot;GeneratesDesignTimeSource&quot;=dword:00000001     <br />[$RootKey$\CLSID]     <br />[$RootKey$\CLSID\{<strong>38BF483F-F6AC-468C-8826-C7DDF6ECED98</strong>}]     <br />@=&quot; <strong>Custom tool that generates C# files based on .xxx files</strong>&quot;     <br />&quot;Class&quot;=&quot; <strong>CompanyName.LanguageName.MyCodeGenerator</strong>&quot;     <br />&quot;InprocServer32&quot;=&quot;$WinDir$\SYSTEM32\MSCOREE.DLL&quot;     <br />&quot;ThreadingModel&quot;=&quot;Both&quot;     <br />&quot;CodeBase&quot;=&quot;$PackageFolder$\<strong>CompanyName.LanguageName.DslPackage.dll</strong>&quot;     <br />[$RootKey$\Generators\{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}\<strong>.myLanguage</strong>] @=&quot;<strong>MyCodeGenerator</strong>&quot;</p>  <p>&#160;</p>  <p>For more details, please refer to the <a href="https://code.msdn.microsoft.com/DSLToolsLab/Release/ProjectReleases.aspx?ReleaseId=4207">Dsl Tools Lab for VS2010</a>, in chapter 4: code generation (pages 20 to 23). It includes a complete end to end example of this.</p>]]></content:encoded>
    </item>
  </channel>
</rss>