Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Constructor 10/30/2009 11:24 PM (edited 10/31/2009 2:23 PM)
I had a few hours spare today so I looked at the possibility of creating a Visual Studio Project Template for Cuyahoga Modules. This would enable the developer to (I will make this really short, there are details missing but you will get the idea):
right click > Add > New Project > Cuyahoga Module

from within Visual Studio and get the complete bare bones module appear, complete with install scripts and post build etc...

I started with just as basic a module as I could (complete with Domain, Data Access, Module Class, POCO etc...). Complete but basic.

Then I export to template and this was fine. Then there was the issue if replacing $tokens$ with custom parameters. Some of these are: $itemname$, $machinename$, $projectname$, $registeredorganization$, $rootnamespace$ etc... You may have used these before.

You can also hardcode parameters by adding elements within the TemplateContent section in the .vstemplate file like this:
< TemplateContent>

    < CustomParameters>
       < CustomParameter Name="$Parameter1$" Value="Value1"/>
       < CustomParameter Name="$Parameter2$" Value="Value2">
    < /CustomParameters
etc...

Since there are only limited available as default and hardcoding them both missed the point and was not flexible enough, I had to create a wizard to run within Visual Studio. :s

To do this requires you to build a Class Library to place in the GAC (this may be optional) that will be the form that collects the user input and then uses it to generate the required project files on the fly (replace the $tokens$ etc...)

In short (VERY short) you implement the Visual Studio IWizard interface inside your class lib, create a form that passes the input to it, build the .dll and put it in the GAC and add a WizardExtension section to the .vstemplate (this tells the devenv the lib to call when you 'New Project'.

So I did this... and.... it works. It needs cleaning, but it would save a lot of boredom getting the foundations of a module down.

I am really glad I had a look at this. :) It also gave me a bit more of an understanding od the development environment also. It is good to learn new things, even better if it will save time in the future.

If it is of help? I may post the project.
# Yeorwned 11/10/2009 7:55 PM
I think it would be neat to take a peek at. I haven't yet taken the time to start from scratch and make a module so maybe it might give me that push I need.
# martijnb 11/11/2009 9:04 AM
This would be a very welcome addition. Due to time constraints I've never been able to even look at this, but it would speed up module development greatly!
# sharonk868 4/14/2010 5:04 PM
YeorwnedI think it would be neat to take a peek at. I haven't yet taken the time to start from scratch and make a module so maybe it might give me that push I need.
I also think so.

__________________
Watch Kick-Ass Online Free
# Constructor 4/14/2010 5:17 PM
Ok, I will dig this out from my drive and post it as soon as I can.
# Constructor 4/20/2010 12:50 PM
I attach the files for the Visual Studio project templates. These were created as the result of general R&D. They are not in any way a final product. Use them as you wish.

I take no responsibility for anything that happens as a result of the use of these files. Etc... :)

# Yeorwned 4/22/2010 5:06 AM
Thanks for the note Constructor. I'll be sure to play with this when time permits! I've been unable to finish my Cuyahoga adventures since I started them many months ago. :(