Michael, the VB project that is at .NET Framework 2, happens to be the main webforms project.
I've got the .vbproj file open in VS Code. There is no useLegacyV2RuntimeActivationPolicy
property in it. What would the default be, if that property isn't set?
I've run the Visual Studio Installer and made use that I've added .NET Framework 4.8 developers tools
and Additional project templates ...
, neither of which had been added before. Unfortunately, it hasn't helped. I opened VS 2019, then tried to open the new, empty VS project, but it failed. Here's what's in the event log:
!
<Channel>Application</Channel>
<Computer>MYMACHINE.nmsg</Computer>
<Security />
</System>
<EventData>
<Data>Application: devenv.exe
```Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NotSupportedException
at Microsoft.VisualStudio.PlatformUI.MultiValueConverter`4[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Convert(System.__Canon, System.__Canon, System.__Canon, System.Object, System.Globalization.CultureInfo)
at Microsoft.VisualStudio.PlatformUI.MultiValueConverter`4[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ConvertCore(System.Object[], System.Type, System.Object, System.Globalization.CultureInfo)
at Microsoft.VisualStudio.PlatformUI.MultiValueConverterBase`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Convert(System.Object[], System.Type, System.Object, System.Globalization.CultureInfo)
at System.Windows.Data.MultiBindingExpression.TransferValue()
at System.Windows.Data.MultiBindingExpression.Transfer()
at System.Windows.Data.MultiBindingExpression.UpdateTarget(Boolean)
at System.Windows.Data.MultiBindingExpression.AttachToContext(Boolean)
at System.Windows.Data.MultiBindingExpression.AttachOverride(System.Windows.DependencyObject, System.Windows.DependencyProperty)
at System.Windows.Data.BindingExpressionBase.OnAttach(System.Windows.DependencyObject, System.Windows.DependencyProperty)
at System.Windows.StyleHelper.GetInstanceValue(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElement, System.Windows.FrameworkContentElement, Int32, System.Windows.DependencyProperty, Int32, System.Windows.EffectiveValueEntry ByRef)
at System.Windows.FrameworkTemplate.ReceivePropertySet(System.Object, System.Xaml.XamlMember, System.Object, System.Windows.DependencyObject)
at System.Windows.FrameworkTemplate+<>c__DisplayClass45_0.<LoadOptimizedTemplateContent>b__3(System.Object, System.Windows.Markup.XamlSetValueEventArgs)
at System.Xaml.XamlObjectWriter.OnSetValue(System.Object, System.Xaml.XamlMember, System.Object)
at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(MS.Internal.Xaml.Context.ObjectWriterContext, System.Xaml.XamlMember, System.Object, Boolean)
at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(MS.Internal.Xaml.Context.ObjectWriterContext)
at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(MS.Internal.Xaml.Context.ObjectWriterContext)
at System.Xaml.XamlObjectWriter.WriteEndObject()
at System.Xaml.XamlWriter.WriteNode(System.Xaml.XamlReader)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)
Exception Info: System.Windows.Markup.XamlParseException
at System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter)
at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector, System.Collections.Generic.List`1<System.Windows.DependencyObject>, System.Windows.UncommonField`1<System.Collections.Hashtable>)
at System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject, System.Collections.Generic.List`1<System.Windows.DependencyObject>)
at System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElementFactory, Int32, System.Collections.Specialized.HybridDictionary, System.Windows.FrameworkTemplate)
at System.Windows.FrameworkTemplate.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.FrameworkElement)
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Primitives.ToolBarPanel.MeasureGeneratedItems(Boolean, System.Windows.Size, Boolean, Double, System.Windows.Size ByRef, Double ByRef)
at System.Windows.Controls.Primitives.ToolBarPanel.MeasureOverride(System.Windows.Size)
at Microsoft.VisualStudio.PlatformUI.VsToolBarPanel.MeasureWithCollapsePrevention(System.Windows.Size)
at Microsoft.VisualStudio.PlatformUI.VsToolBarPanel.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.DockPanel.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)
at System.Windows.Controls.ToolBar.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at Microsoft.VisualStudio.PlatformUI.VsToolBarTray.WorkaroundMeasureOverride(System.Windows.Size)
at Microsoft.VisualStudio.PlatformUI.VsToolBarTray.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.DockPanel.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Window.MeasureOverrideHelper(System.Windows.Size)
at System.Windows.Window.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
at System.Windows.Interop.HwndSource.set_RootVisual(System.Windows.Media.Visual)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(System.Object)
at System.Windows.Window.Show()
at Microsoft.VisualStudio.PlatformUI.GetToCode.QuickStartWindow.OnClosing(System.Object, Microsoft.VisualStudio.PlatformUI.GetToCode.WorkflowHostClosingEventArgs)
at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
at Microsoft.VisualStudio.PlatformUI.GetToCode.WorkflowHostViewModel.OnCloseExecuted(Microsoft.VisualStudio.PlatformUI.GetToCode.WorkflowCompletedEventArgs)
at Microsoft.VisualStudio.PlatformUI.GetToCode.WorkflowHostViewModel.OnCompleted(System.Object, Microsoft.VisualStudio.PlatformUI.GetToCode.WorkflowCompletedEventArgs)
at Microsoft.VisualStudio.PlatformUI.GetToCode.WorkflowHostViewModel+WorkflowDecorator.<AddHandlers>b__36_3(System.Object, Microsoft.VisualStudio.PlatformUI.GetToCode.WorkflowCompletedEventArgs)
at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
at Microsoft.VisualStudio.PlatformUI.GetToCode.GetToCodeWorkflowViewModel.OnMruItemOpening(System.Object, Microsoft.VisualStudio.PlatformUI.MruItemOpeningEventArgs)
at Microsoft.VisualStudio.PlatformUI.CodeContainerListViewModel.OnOpen(Microsoft.VisualStudio.PlatformUI.CodeContainerViewModelBase)
at Microsoft.VisualStudio.PlatformUI.CodeContainerViewModelBase+<>c__DisplayClass68_0.<.ctor>b__0(System.Object)
at Microsoft.VisualStudio.PlatformUI.DelegateCommand.Execute(System.Object)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
</Data>
</EventData>
</Event>
xxxx