Closed ghost closed 7 years ago
Can you provide any additional information to help identify the cause of this:
I'm getting the same:
Error generated in VS Community 2017 15.3-Pre
System.MissingMethodException: Method not found: 'System.Func`3<Microsoft.TemplateEngine.Abstractions.ITemplateInfo,System.String,System.Nullable`1<Microsoft.TemplateEngine.Edge.Template.MatchInfo>> Microsoft.TemplateEngine.Edge.Template.WellKnownSearchFilters.LanguageFilter(System.String)'.
at Microsoft.Templates.Core.TemplatesRepository.GetAll()
at Microsoft.Templates.UI.GenComposer.GetSupportedFx(String projectType)
at Microsoft.Templates.UI.ViewModels.ProjectSetupViewModel.LoadFrameworks(MetadataInfoViewModel projectType, MetadataInfoViewModel orgFramework)
at Microsoft.Templates.UI.ViewModels.ProjectSetupViewModel.set_SelectedProjectType(MetadataInfoViewModel value)
at Microsoft.Templates.UI.ViewModels.ProjectSetupViewModel.<InitializeAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Templates.UI.Views.ProjectSetupView.<<-ctor>b__3_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at System.Windows.Window.ShowDialog()
at Microsoft.Internal.VisualStudio.PlatformUI.WindowHelper.ShowModal(Window window, IntPtr parent)
at Microsoft.Templates.UI.VisualStudio.VsGenShell.ShowModal(Window dialog)
at Microsoft.Templates.UI.GenController.GetUserSelection()
Does it happen every time? Yes
What version of Visual Studio are you using?
What version of the OS do you have? Windows 10 Pro
Do you have any versions of dotnet new installed?
Have you tried reinstalling the VSIX?
Yes
UPDATE
Ok, the first time it failed in VS 2017 15.2 Enterprise, then I tried in 15.3-preview (Enterprise and Community) then tried in 15.2 Enterprise again and it worked fine the second time.
we saw something like this on preview the night before our session but couldn't repro on RTM. I got the same stack trace.
100% issue, i'm going to say this is a 1.01 issue to stabilize but VS non-preview does work with that error.
Ok, i can repro this VS Preview with the VSIX but I cannot repro this in code.
I've compiled and installed locally, doesn't seem to have an issue. I thought it may due to an outdated nuget to the template engine but the fact the dev branch won't cause this makes me wonder
Ok, release mode compile local VSIX confirmed to cause this.
Fix ready. Updating the nuget reference to the VS template generator fixed this in #344
@crutkas Why does updating the NuGet package fix this? Would be good to understand what the actual issue is and why it only affected some people. What's to stop this new version affecting a different set of people?
VS 15.3 Preview updated a reference and they have a bug where they weren't rev'ing the Assembly. We referenced an older assembly and we exploded.
Hmm. reported as affecting VS15.2 as well though. Hopefully a reporting error. A good argument for getting more (system) info added to the error dialog.
@mrlacey who reported this exact issue on 15.2?
@crutkas it's in this thread above
Ok, the first time it failed in VS 2017 15.2 Enterprise
@AustinWinstanley can you reach out to me. the fact this happend on a 15.2 install worries me but every other report seems to be 15.3.
Fix is in production
I get a method not found error when templates are about to download.