Context : I'm currently working on a VB.NET multi-project template with cross-references between them, which works almost fine.
Problem : VS generates new GUIDs for each project generated and updates them into the new .sln and each new .vbproj but never updates the project references into the .vbproj the same way.
Here is a .vbproj example :
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProductVersion>
</ProductVersion>
<SchemaVersion>
</SchemaVersion>
<ProjectGuid>{_NewGUIDGeneratedByVS_}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Template.DataModel</RootNamespace>
<AssemblyName>Template.DataModel</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
...And further in another generated .vbproj which refers to the previous project :
<ProjectReference Include="..\Template.DataModel\Template.DataModel.vbproj">
<Project>{_OldBoringGUID_}</Project>
<Name>Template.DataModel</Name>
</ProjectReference>
Some Clues : I already tried to force specific GUID replacements via replacementsDictionary
in my IWizard
Root and Child derived classes, but VS keeps replacing old GUIDs :
Here, the $Sguid6$
tag will be ignored by VS and will be replaced by a new shiny GUID !
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{$Sguid6$}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>$safeprojectname$.My.MyApplication</StartupObject> <RootNamespace>$safeprojectname$</RootNamespace>
<AssemblyName>$safeprojectname$</AssemblyName>
Then again in another .vbproj : the $Sguid6$
will take the GUID i told him to take in my replacementsDictionary
, as expected.
<ProjectReference Include="..\$safeprojectname$.DataModel\$safeprojectname$.DataModel.vbproj">
<Project>{$Sguid6$}</Project>
<Name>$safeprojectname$.DataModel</Name>
<Private>True</Private>
</ProjectReference>
Question : How could i tell VS to swap correctly all these GUID, or at least not to change them ?