When trying to add an EF Core database project to an existing component within a solution, an empty modal appears and Visual Studio stops responding.
It is not possible to interact with the modal, e.g. to move or close it.
After a while - time was not stopped - Visual Studio crashes completely.
When checking for changes, it was found that nothing had been changed - neither the solution file nor the source code itself.
To Reproduce
Prerequisites:
Run this on a German VM in the German company environment
Solution contains already:
YARP component
Arc4u Micro-Service (ASP.NET Core) component
Steps to reproduce the behavior:
Add EfCore database project to Micro-Service a component
Right click on Micro-Service solution folder (e.g.: Calculation)
Select Add an EfCore database project
Enjoy how Visual Studio crashes after a while :boom:
Expected behavior
A EF Core database project incl. the migration tool was properly added to the target component, regardless of the environment I'm working in (BE vs. DE).
Screenshots
The following screenshot presents the steps to reproduce at once:
After selecting the context menu entry, the following modal shows up and from than Visual Studio and the modal stop responding:
The following Windows event log entry was created immediately as the context menu to add an EF Core project was selected. As it is usually more practical to be able to copy something from the stacktrace for troubleshooting, the stacktrace has also been added as text in the "Additional context" section.
Desktop (please complete the following information)
Visual Studio v17.9.7
.NET SDK v8.0.200
Guidance v2022.2.1.14
Arc4u v8.1.0
Additional context
Please find following Windows error event entry that was created instantly the Add an EfCore database project menu entry was clicked:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
at System.Data.Common.DbConnectionOptions.ParseInternal(System.Collections.Hashtable, System.String, Boolean, System.Collections.Hashtable, Boolean)
at System.Data.Common.DbConnectionOptions..ctor(System.String, System.Collections.Hashtable, Boolean)
at System.Data.SqlClient.SqlConnectionString..ctor(System.String)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(System.String, System.Data.Common.DbConnectionOptions)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(System.Data.Common.DbConnectionPoolKey, System.Data.ProviderBase.DbConnectionPoolGroupOptions, System.Data.Common.DbConnectionOptions ByRef)
at System.Data.SqlClient.SqlConnection.ConnectionString_Set(System.Data.Common.DbConnectionPoolKey)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(System.String)
at System.Data.SqlClient.SqlConnection..ctor(System.String, System.Data.SqlClient.SqlCredential)
at GuidanceCore.AddSqlDatabaseDialog.ReadDatabses()
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.Controls.ComboBox.OnSelectionChanged(System.Windows.Controls.SelectionChangedEventArgs)
at System.Windows.Controls.Primitives.Selector+SelectionChanger.End()
at System.Windows.Controls.Primitives.Selector+SelectionChanger.SelectJustThisItem(ItemInfo, Boolean)
at System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
at System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
at System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, System.Object)
at GuidanceCore.AddSqlDatabaseDialog.AddDatabaseDialog_Loaded(System.Object, System.EventArgs)
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.BroadcastEventHelper.BroadcastEvent(System.Windows.DependencyObject, System.Windows.RoutedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(System.Object)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)
at System.Windows.Media.MediaContext.RenderMessageHandler(System.Object)
at System.Windows.Interop.HwndTarget.OnResize()
at System.Windows.Interop.HwndTarget.HandleMessage(MS.Internal.Interop.WindowMessage, IntPtr, IntPtr)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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)
Describe the bug
When trying to add an EF Core database project to an existing component within a solution, an empty modal appears and Visual Studio stops responding.
It is not possible to interact with the modal, e.g. to move or close it. After a while - time was not stopped - Visual Studio crashes completely.
When checking for changes, it was found that nothing had been changed - neither the solution file nor the source code itself.
To Reproduce
Prerequisites:
Steps to reproduce the behavior:
EfCore database project
to Micro-Service a componentAdd an EfCore database project
Expected behavior
A EF Core database project incl. the migration tool was properly added to the target component, regardless of the environment I'm working in (BE vs. DE).
Screenshots
The following screenshot presents the steps to reproduce at once:![image](https://github.com/GFlisch/Arc4u.Guidance.Doc/assets/4867233/a9f7072b-f0b0-4b17-8428-e4347f1c701d)
After selecting the context menu entry, the following modal shows up and from than Visual Studio and the modal stop responding:![image](https://github.com/GFlisch/Arc4u.Guidance.Doc/assets/4867233/06868bf3-c373-40fa-bce3-df42b36c0b25)
The following Windows event log entry was created immediately as the context menu to add an EF Core project was selected. As it is usually more practical to be able to copy something from the stacktrace for troubleshooting, the stacktrace has also been added as text in the "Additional context" section.![image](https://github.com/GFlisch/Arc4u.Guidance.Doc/assets/4867233/4dff8386-405c-4821-bace-d62cea720f2c)
Desktop (please complete the following information)
v17.9.7
v8.0.200
v2022.2.1.14
v8.1.0
Additional context
Please find following Windows error event entry that was created instantly the
Add an EfCore database project
menu entry was clicked: