I have successfully created a multiproject template using this guide: https://github.com/ligershark/side-waffle/wiki/How-to-create-a-multi-project-template
The issue im having is the ability to change the default namespace and default assembly name for the generated projects. Like it is explained here: http://reasoncodeexample.com/2013/06/09/creating-visual-studio-project-templates/ where a custom parameter defines f.ex. the default namespace.
Essentially i would like to ensure that our company name is always in the beginning of the namespace...
I cannot make it work with the SideWaffle project template, and im wondering if anyone has an idea as to how one can define the default namespace and assemblyname, while using the SideWaffle project template.
This is not an answer, but a further explanation into the above issues, and i apologize for the length.
So i have setup a IWizard implementation to modify the csproj and as discussed with @Sayed i have tried his solution. Here are my findings.
This is the interresting part of the
IWizard
implementationAnd the
_preprocess.xml
The namespace part is only to test that the wizard is executed, and indeed it is, because i can observe that change to namespacing in all classes in the template in the experimental VS. (the classes are then invalid, but at least it shows the execution of the wizard).
But it should change the
RootNamespace
andAssemblyname
and to do that i will need to remove the exclusion of*.csproj
in the_preprocess.xml
Doing this change invalidates the xml. Example of cleaned
_preprocess.xml
observe the removal of
*.csproj
Building the solution will cause compile error:
Ok. so the problem is now the presense of
$
and removing them and any whitespaces will allow the solution to build, but of course the replacement will not work, since the replacement values cannot be found.Modified xml that builds but does not work.
So @Sayed i really hope you have an idea as to what is going on here.