The EnvDTE.CodeFunction.CanOverride property setter can be used to add a virtual keyword to the method definition.
The T4MVC template makes all controller methods virtual so it can override them in another generated class.
The EnvDTE.CodeClass2.ClassKind property setter can be used to add a partial keyword to the class definition.
The T4MVC template makes all controller classes partial so it can add extend the original class with an associated partial controller class that it generates.
The T4MVC template uses EnvDTE.ProjectItems.AddFromFile() to add its generated files as dependent files.
If the project items belong to a file then the DependentUpon property is set in the MSBuild project.
When find in files matches text in a .txt file then EditorControlService.Instance.CreateHighlighter() returns null since .txt files have no syntax highlighting.
Throw exception when unknown item requested from EnvDTE.ProjectItems.Item() instead of returning null.
The T4MVC template relies on this behaviour when looking for folders that do not exist.
Convert project items generated by yield return to a list before allowing them to be used in a different app domain. The class generated by using the yield keyword is not serialisable.
Minor changes to T4MVC.tt:
1) Change imported assemblies and namespaces to refer to SharpDevelop's implementation of EnvDTE.
2) Change use of parameterised properties to method calls so no VB.NET classes are required.
Use $filter=IsLatestVersion when requesting packages from the online NuGet feed. Reduces the number of requests sent and the results are displayed quicker.
Maintains any solution variables added between accesses to the $dte.Solution in the Powershell console.
This allows the Unity NuGet package to install without any errors.
Added a VB.NET Globals class which implements multiple parameterised properties which are not supported in C#.
This allows Powershell to use properties on the Globals class as though they were methods:
$dte.Solution.Globals.VariableValue("MyValue") = "value"
Write-Host $dte.Solution.Globals.VariableValue("MyValue")
$dte.Solution.Globals.VariablePersists("MyValue") = $true
Write-Host $dte.Solution.Globals.VariablePersists("MyValue")
Save solution when:
1) EnvDTE.Solution.Globals.VariablePersists is set to true.
2) An existing solution item is changed by EnvDTE.Solution.Globals.VariableValue.