Inside my template file I use the safeitemname
template variable to define my class name. The Item Template is intended to create a class that subclasses MXApplication
. The result after exporting the template and utilizing it to create a new class is essentially the class inherits from itself. If I try adding a namespace to the class, I just get the namespace prefixed before the value substituted for safeitemname
.
Here is the Template class (trimmed for explanation purposes):
namespace $rootnamespace$
{
public class $safeitemname$ : MonoCross.Navigation.MXApplication
{
public override void OnAppLoad()
{
//Do the work
}
}
}
The result when I use the template to create MyApp
is:
namespace MyNameSpace
{
public class MyApp : MonoCross.Navigation.MyApp
{
public override void OnAppLoad()
{
//Do the work
}
}
}
I've tried to export this template using VS2012 (and VS2013).
Any advice would be much appreciated. I've been trying to update my Item Templates in Visual Studio 2012 (they worked in 2010) but I keep running into this issue. I've tried it on several of my existing templates; and even tried recreating the .csproj and adding my existing templates to the .csprog file created using Visual Studio 2012. All of my attempts result in the same class inheritance issue.
This is the MSDN Doc I've been using for reference: http://msdn.microsoft.com/en-us/library/vstudio/tsyyf0yh.aspx