Reputation:
My open source project DataTier.Net (https://github.com/DataJuggler/DataTier.Net) is in the process of being upgraded to work with DotNetCore.
Everything works after I updated my Nuget packages, but when I got to the point of updating the multiple project template that is installed into Visual Studio, all the folders are created but none of the files are included.
I admit I copied my .vstemplate files from my .NetFramework project templates since I do not even see 'Export Template' as a menu option for DotNetCore.
I do realize projects include all files in dotnetcore, but the replace parameters for the namespaces for the files I do need has to occur so I am stuck.
Here is one of the .vstemplate files:
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>DataGateway</Name>
<Description>Create a new DataGateway which is part of a DataTier.Net.Core class library.</Description>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>
</ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>DataGateway</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>__TemplateIcon.ico</Icon>
</TemplateData>
<TemplateContent>
<Project TargetFileName="DataGateway.csproj" File="DataGateway.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="Gateway.cs">Gateway.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="ListHelper.cs">ListHelper.cs</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>
Have templates completely changed for dot net core? I searched Google and couldn't find an answer.
Upvotes: 0
Views: 409
Reputation:
Templates have totally changed, which is probably for the best as the old way was a pain, but at least it was a pain I knew how to do.
The good news is now they use Nuget packages, so that is easier for everyone:
https://learn.microsoft.com/en-us/dotnet/core/tutorials/cli-templates-create-project-template
This uses a command line, which I would rather have a GUI, but if it works it works.
I will post an update on my progress learning how to use the new templates as soon as I can.
Upvotes: 1