.net-4.7

WPF COMException Crashes Application At Startup (Started Today)

那年仲夏 提交于 2019-11-30 11:14:53
I have just today started seeing this Exception out in the wild on application launch with an app that has been in production for 3 years. System.TypeInitializationException: The type initializer for 'MS.Win32.Penimc.UnsafeNativeMethods' threw an exception. ---> System.Runtime.InteropServices.COMException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) at MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager() at MS.Win32.Penimc.UnsafeNativeMethods.

Can't choose .NET 4.7

青春壹個敷衍的年華 提交于 2019-11-29 22:44:39
I am trying to start a new project using .NET 4.7. I have Creators Update installed as well as the latest version of Visual Studio 2017. When I start a project and device to choose a .NET version, the latest .NET framework version I have is 4.6.2. When I go to download a new .NET framework, it only lists 4.6.2 as the latest via MS that you can download. It says that .NET 4.7 is included in VS 2017. What am I missing? You need to go to Visual Studio Installer and install an optional component ".NET Framework 4.7 Development Tools". The .NET Framework 4.7 was released as part of Windows 10

WPF COMException Crashes Application At Startup (Started Today)

心不动则不痛 提交于 2019-11-29 17:21:14
问题 I have just today started seeing this Exception out in the wild on application launch with an app that has been in production for 3 years. System.TypeInitializationException: The type initializer for 'MS.Win32.Penimc.UnsafeNativeMethods' threw an exception. ---> System.Runtime.InteropServices.COMException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) at MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid&

Call async method on UI thread

陌路散爱 提交于 2019-11-28 12:42:04
I'm trying to create WPF client with IdentityServer authentication. I'm using their OidcClient to get logged in. It's whole async while my app is sync and can't be refactored without huge effort. Calling var result = await _oidcClient.LoginAsync(); doesn't wait for the result. Calling Wait() or .Result causes deadlock. Wrapping it to other Task.Run is complaining that the method is not running on UI thread (it opens browser with login dialog). Do you have any idea, how to solve this? Do I need to write custom sync OidcClient ? As with other similar cases where you need to introduce asynchrony

Can't choose .NET 4.7

孤人 提交于 2019-11-27 11:01:23
问题 I am trying to start a new project using .NET 4.7. I have Creators Update installed as well as the latest version of Visual Studio 2017. When I start a project and device to choose a .NET version, the latest .NET framework version I have is 4.6.2. When I go to download a new .NET framework, it only lists 4.6.2 as the latest via MS that you can download. It says that .NET 4.7 is included in VS 2017. What am I missing? 回答1: You need to go to Visual Studio Installer and install an optional