
OVERVIEW
========
https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-use-wizards-with-project-templates?view=vs-2017











::CONVERT TO NET CORE
::===================
::https://www.danielcrabtree.com/blog/314/upgrading-to-net-core-and-net-standard-made-easy
::https://natemcmaster.com/blog/2017/03/09/vs2015-to-vs2017-upgrade/#approach-two-manually-convert
::file:///C:/Users/gtrev/Documents/Portability%20Analysis/ApiPortAnalysis.html#Portability%20Summary
::dotnet migrate-2017 migrate "C:\_git\AngularBasic\vsixTemplatePackSideWaffle\vsixTemplatePackSideWaffle.csproj"
::https://app.pluralsight.com/library/courses/dotnet-standard-getting-started/table-of-contents





























rem BUG: VSSDK: error VsixPub0029 : An error occurred while communicating with the marketplace: categories: Your extension type does not match the VSIX. It should be configured as a Template type.
rem FIX: the category determines the type templates/controls/tools
::the template categories are (must be lower case in json file)
::	AJAX 
::	ASP.NET
::	Visual Studio Extensions
::	Other
::	several more
::the controls categories are
::	see manual upload page
::the tools categories are
::	see manual upload page
 






















rem build "array" of .csproj files in sub-folders
::set folderCnt=0

rem /F = loop thru files
rem /b = bare format output of dir
rem /o-d = sort output of dir, -d means sort by newest date 
rem /s = trawl sub-directories
rem /tc = sort by time created
rem https://stackoverflow.com/questions/10544646/dir-output-into-bat-array
::for /f "eol=: delims=" %%F in ('dir /b/o-d/s/tc *.csproj') do (
::  set /a folderCnt+=1
::  set "folder!folderCnt!=%%F"
::)

rem Open the last .csproj in "array" which is the .csproj file we just created (ideally we would open the newly generated project in the existing instance of Visual Studio, but the closest I got to this was "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe" /edit C:\temp\j2\j2.csproj which opens the .csproj file in existing VS instance (not the experimental one), but as a text file not as a project file)
:: !folder%folderCnt%!
























  <TemplateData>
     <!--Omitting 'RequiredFrameworkVersion' avoids user being prompted for framework version nbr-->
    <!--<RequiredFrameworkVersion>2.1</RequiredFrameworkVersion> value must be integer, and this is valid, but results in user being prompted for framework version nbr-->
    <!--<RequiredFrameworkVersion>netcoreapp2.1</RequiredFrameworkVersion> 'netcoreapp2.1' is taken from 'netcoreapp2.1' in matt's csproj; value must be integer, and this is INvalid, but avoids user being prompted for framework version nbr-->
  </TemplateData>
  <TemplateContent>
    <!--
    <Project File="ProjectTemplate.csproj" ReplaceParameters="true">
      <ProjectItem ReplaceParameters="true" TargetFileName="Properties\AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
      <ProjectItem ReplaceParameters="true" OpenInEditor="true">Class1.cs</ProjectItem>
    </Project>
    -->
  </TemplateContent>






 _yoProcessor.Generate();
// As soon as new project dialog 'go' clicked the wizard is invoked which does zero substitution & creates the NA1 folder & simultaneously opens the yo dialog. when user clicks 'ok' on my yo dialog we get here, and the yo.bat is run. whilst yo.bat is running async we continue to call Close() and can be all but certain the NA1 folder exists  




using (var process = Process.Start(processStartInfo))
{
    //The following blocks the Visual Studio UI thread
    //process.WaitForExit();
}

//process.WaitForInputIdle(1000);
//Wait for the process to exit or time out.
//process.WaitForExit(123456789);
//Check to see if the process is still running.
//if (process.HasExited == false)
//{
//    //Process is still running. Test to see if the process is hung up.
//    if (process.Responding)
//    {
//        //Process was responding; close the main window.
//        process.CloseMainWindow();
//    }
//    else
//    {
//        //Process was not responding; force the process to close.
//        process.Kill();
//    }
//}   
//MessageBox.Show("Code continuing...");
