This is what I did in 4.8
Dim exePath As String = System.Reflection.Assembly.GetExecutingAssembly.CodeBase
p = Process.Start(New ProcessStartInfo(exePath) With {.Verb = "runas"})
4.8 produced a .exe file and CodeBase above returned it.
5.0 produces both an .exe and a .dll file and CodeBase returns the .dll file. So the above in Net5 fails.
It just occurred to me that I could try replacing the dll string with exe but that seems a little kluged.
Is there a good Net5.0 way to do the above?
Dim exePath As String = System.Reflection.Assembly.GetExecutingAssembly.CodeBase
p = Process.Start(New ProcessStartInfo(exePath) With {.Verb = "runas"})
4.8 produced a .exe file and CodeBase above returned it.
5.0 produces both an .exe and a .dll file and CodeBase returns the .dll file. So the above in Net5 fails.
It just occurred to me that I could try replacing the dll string with exe but that seems a little kluged.
Is there a good Net5.0 way to do the above?