AvaloniaUI / TemplateStudio

Template Studio accelerates the creation of new Avalonia UI apps using a wizard-based experience.
Other
38 stars 7 forks source link

Unable to create new Avalonia project on Visual Studio Preview #25

Closed MarkBrainfire closed 1 year ago

MarkBrainfire commented 1 year ago

Describe the bug In Visual Studio Version 17.8 Preview 1.0 a template error msg is displayed when attempting to create a C# Avalonia application.

To Reproduce Use Visual Studio Verion 17.8 Preview 1.0 to attempt to create a new solution. When you press "Create" the error will be displayed.

Work Around Use the current stable version of Visual Studio.

Screenshots Avalonia Error

timunie commented 1 year ago

Please let us also know the template version you tried and try to get the infos hidden under Detials.

Could also be a vs issue btw.

MarkBrainfire commented 1 year ago

Avalonia for Visual Studio ver: 11.1
Avalonia Template Studio ver: 1.3

MarkBrainfire commented 1 year ago

Here are the error details: System.MissingMethodException: Method not found: 'System.Collections.Generic.IReadOnlyList1<Microsoft.TemplateEngine.Abstractions.ITemplate> Microsoft.TemplateEngine.Edge.Settings.ScanResult.get_Templates()'. at Microsoft.Templates.Core.TemplatesRepository.GetAll() at Microsoft.Templates.Core.TemplatesRepository.GetSupportedProjectTypes(UserSelectionContext context) at Microsoft.Templates.Core.TemplatesRepository.GetProjectTypes(UserSelectionContext context) at Microsoft.Templates.UI.Services.DataService.LoadProjectTypes(ObservableCollection1 projectTypes, UserSelectionContext context) at Microsoft.Templates.UI.ViewModels.NewProject.ProjectTypeViewModel.d1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Templates.UI.ViewModels.NewProject.MainViewModel.d38.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Templates.UI.Views.NewProject.NewProjectWizardShell.d15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 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 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.Window.ShowHelper(Object booleanBox) at System.Windows.Window.ShowDialog() at Microsoft.Internal.VisualStudio.PlatformUI.WindowHelper.ShowModal(Window window, IntPtr parent) at Microsoft.Templates.UI.VisualStudio.GenShell.VsGenShellUI.d8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Templates.UI.VisualStudio.GenShell.VsGenShellUI.<>c__DisplayClass7_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() at Microsoft.Templates.UI.VisualStudio.GenShell.VsGenShellUI.ShowModal(IWindow shell) at Microsoft.Templates.UI.Launcher.WizardLauncher.LaunchWizardShell(IWizardShell wizardShell) at Microsoft.Templates.UI.Launcher.WizardLauncher.StartWizard(IWizardShell wizardShell, WizardTypeEnum wizardType)

maxkatz6 commented 1 year ago

Transferred to the correct repository. But still, it doesn't seem to be an error in our template, but rather in Visual Studio templating engine. Could you please report it to the Visual Studio bug tracker and link issue here?

MarkBrainfire commented 1 year ago

It may indeed be a VS problem. Yes, I'll report it to them.

Done!

timunie commented 1 year ago

please file the link here. Thx.

DimKanenas commented 1 year ago

The error produced also when the extension is installed but not the templates. To install the Avalonia templates, in command line, run the following command: dotnet new install Avalonia.Templates

Takoooooo commented 1 year ago

Blocked by dependency,currently,my only advice is to downgrade to 17.7 ;(

Takoooooo commented 1 year ago

duplicate of #20