Пример #1
0
    static void Install()
    {
        //dotnet new --install \nugets\ParticularTemplates.xxx.nupkg
        var nugets    = Path.GetFullPath(Path.Combine(ProjectDirectory.ProjectPath, "..", "..", "nugets"));
        var nugetPath = Directory.EnumerateFiles(nugets, "*.nupkg").Single();

        DotNetTemplatesHelper.Install(nugetPath);
    }
Пример #2
0
    static void Install()
    {
        //dotnet new --install \nugets\NServiceBus.Template.WindowsService.xxx.nupkg
        var nugets    = Path.GetFullPath(Path.Combine(ProjectDirectory.ProjectPath, "../../nugets"));
        var nugetPath = Directory.EnumerateFiles(nugets, "*.nupkg").Single();

        DotNetTemplatesHelper.Install(nugetPath);
    }
Пример #3
0
 void Uninstall()
 {
     // dotnet new --uninstall ParticularTemplates
     DotNetTemplatesHelper.Uninstall("ParticularTemplates");
 }
Пример #4
0
 static void VerifyAndBuild(string templateName, string targetDirectory, Dictionary <string, string> parameters = null)
 {
     DotNetTemplatesHelper.Run(templateName, targetDirectory, parameters);
     VerifyDirectory(targetDirectory);
     DotNetTemplatesHelper.Build(targetDirectory);
 }