microsoft/TemplateStudio

Project creation failed.

drchilds opened this issue · 19 comments

Possibly related to #609

Stable release from the Marketplace, Template Studio projects work in VS2017 15.3 Preview, but not in the current 15.2 install.

Solution folders are created, but are empty, and no Template Studio window appears. Log follows:

>>>>>>>>>>>>>> Log started 20170707 05:06:24.371
>>>>>>>>>>>>>> Assembly File Version: 1.1.17173.2
[20170707 05:06:24.438]	dave	12884(1)		Information	Configuration file loaded: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\3ZSVAEFB.GSJ\WindowsTemplateStudio.config.json

>>>>>>>>>>>>>> Log started 20170707 05:19:47.862
>>>>>>>>>>>>>> Assembly File Version: 1.1.17173.2
[20170707 05:19:47.939]	dave	13948(1)		Information	Configuration file loaded: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\PREVIEW\ENTERPRISE\COMMON7\IDE\EXTENSIONS\3ZSVAEFB.GSJ\WindowsTemplateStudio.config.json
[20170707 05:20:17.974]	dave	13948(1)		Information	Creating Windows Template Studio project...
[20170707 05:20:17.988]	dave	13948(1)		Information	Generating the template Default to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:25.192]	dave	13948(1)		Information	Generating the template Blank to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:27.627]	dave	13948(1)		Information	Generating the template Blank to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:29.253]	dave	13948(1)		Information	Generating the template Settings to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:31.226]	dave	13948(1)		Information	Generating the template Settings Storage to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:32.796]	dave	13948(1)		Information	Generating the template Suspend and Resume to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:33.914]	dave	13948(1)		Information	Generating the template Background Task to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:35.304]	dave	13948(1)		Information	Generating the template Background Task to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:35.735]	dave	13948(1)		Information	Generating the template Toast Notifications to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:37.241]	dave	13948(1)		Information	Generating the template MVVMLight.Project to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:38.745]	dave	13948(1)		Information	Generating the template MVVMLight.Project.SplitView to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:41.964]	dave	13948(1)		Information	Generating the template MVVMLight.Page.AddViewModel to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.083]	dave	13948(1)		Information	Generating the template MVVMLight.Project.SplitView.AddToPrimaryNavigationItems to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.127]	dave	13948(1)		Information	Generating the template Project.SplitView.AddNavigationPaneRessources to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.160]	dave	13948(1)		Information	Generating the template Project.SplitView.Page.AddAdaptiveTriggerForPageTitle_Blank_Settings_TabbedPivot to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.190]	dave	13948(1)		Information	Generating the template MVVMLight.Page.AddViewModel to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.265]	dave	13948(1)		Information	Generating the template MVVMLight.Project.SplitView.AddToPrimaryNavigationItems to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.307]	dave	13948(1)		Information	Generating the template Project.SplitView.AddNavigationPaneRessources to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.343]	dave	13948(1)		Information	Generating the template Project.SplitView.Page.AddAdaptiveTriggerForPageTitle_Blank_Settings_TabbedPivot to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.374]	dave	13948(1)		Information	Generating the template MVVMLight.Page.AddCommandNS to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.410]	dave	13948(1)		Information	Generating the template MVVMLight.Page.AddViewModel to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.484]	dave	13948(1)		Information	Generating the template MVVMLight.Page.Settings.AddShellThemeSupport_SplitView to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.522]	dave	13948(1)		Information	Generating the template MVVMLight.Project.SplitView.AddToSecondaryNavigationItems to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.569]	dave	13948(1)		Information	Generating the template Page.Settings.AddInitialization_Blank_SplitView to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.607]	dave	13948(1)		Information	Generating the template Project.SplitView.AddNavigationPaneRessources to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.641]	dave	13948(1)		Information	Generating the template Project.SplitView.Page.AddAdaptiveTriggerForPageTitle_Blank_Settings_TabbedPivot to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:42.672]	dave	13948(1)		Information	Generating the template MVVMLight.Feature.SuspendAndResume.AddNavigation to c:\users\dave\Source\Repos\App8\App8.
[20170707 05:20:43.300]	dave	13948(1)		Information	Generation finished

if this is the stable version against preview, something could have been adjusted in preview without us knowing as I believe we are focused primarily on RTM.

We had an issue at launch against preview but this is an easy thing to test against.

@drchilds what is the version # of the VS Preview you're running?

To be clear... it works in 15.3 Preview, it does not work in RTM.

RTM version is 15.2 (26430.15), Preview Version is 15.3.0 Preview 3 (no build number that I can find).

OH, that changes everything. That is very interesting then.

Yes indeed. :)

can you include your logs from %programdata%/WindowsTemplateStudio/Logs from the program you generated? if you don't want to post them here, you can email me them crutkas@microsoft.com and i can post the relevant data. You're looking for chances are WTS_20170707.log


>>>>>>>>>>>>>> Log started 20170707 05:55:33.854
>>>>>>>>>>>>>> Assembly File Version: 1.1.17173.2
[20170707 05:55:33.926]	dave	6436(1)		Information	Configuration file loaded: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\3ZSVAEFB.GSJ\WindowsTemplateStudio.config.json

Literally, that's it. It fails before I see the main WTS dialog, so it's not an issue with what I'm selecting.

Further, I've uninstalled and reinstalled both copies in the RTM and Preview VS instances. I'm baffled. Nothing in the Win Event Logs either.

  1. Does VS have a pending update? (Run Visual Studio Installer)
  2. Have you restarted your machine? (Pains for me to ask this one)

@ralarcon do you have any ideas what could be causing that?

  1. Never. I have a hard time watching MVA sometimes because they always have notification flags active. ;)
  2. I understand. Yes. Several times.

Appreciate the help guys.

looping in @rido-min as he may have some ideas as well for helping debug.

  1. Do you ever have both VS and VS Preview open at the same time?
  2. if you delete "%programdata%/WindowsTemplateStudio/templates" folder, does it fix it
  1. Sometimes, but the error persists after a reboot and just going into VS RTM.
  2. No. I've manually deleted that folder and uninstalled/reinstalled the .visx several times as well.

Obviously, the workaround is to create the project in Preview and bring it into a VS RTM solution, and this works, but I wanted to bring this to your attention in case there's something more nefarious going on.

First, 100% thanks for alerting us and creating a bug. Gotta figure out what is happening now and how to repro.

We may need your help to debug this as I don't think i've seen this in the wild before on the 1.1 build.

Any other interesting configuration adjustments you may have? I see VS is on c:\ but wondering if something else could have been adjusted.

If I'm not wrong, the next VS update will be delivering the dotnet templating libraries, something could be related to this. Drilling down into this right now.

I have a repro when installing the release version in both instances. But still investigating since the behavior is not consisten: not happened deploying a nightly version nor when deployed a local version...

Any other interesting configuration adjustments you may have? I see VS is on c:\ but wondering if something else could have been adjusted.

Sorry for the delay. No nothing too unusual. Not on an Insider build of Windows, but I do have an Insider SDK installed. I also have .Net Core Previews 2.0 installed.

I have a repro when installing the release version in both instances.

That's my configuration.

I have more isolated the issue.

The problem is related to the instantiation of the Microsoft.TemplateEngine assemblies (as suspected).

The version delivered with the preview is higher than the version delivered by us (but still is 1.0.0.x) so, I can't ensure exactly why it looks like there is an assembly cache once the assemblies are loaded it remains until you generate or something like this. The fact is that if the latest version of the Microsoft.TemplateEngine assemblies are loaded, then our VSIX crashes trying to instantiate. The thing is that the exception is not catch and reachs directly VS.

We will update the assemblies for the next release (coming soon). As a workarround, I identified that if you re-install the extension in the VS2017 you are able to launch WTS again (but if you lauch the generation from the preview, something could be break).

My advice is to do not run / install the WTS extension in the VS Preview 3 till the next release because it leads to a unexpected behaviors.