Skip to content

Unable to load DLL 'wpfgfx_cor3.dll' or one of its dependencies #2009

@dagood

Description

@dagood

@pieterphilippaerts commented on Sat Oct 05 2019

I've written a .NET Core 3 WPF application and it works perfectly on my development machine (Windows 10, x64). Unfortunately, when I try to deploy it on my test computer (Windows 8.1, x86) I get an error.

When I start the application, it starts executing (it creates a few files and directories) and I also see the splash screen. However, when the main window of the application gets loaded, I get the following error:

System.Windows.Markup.XamlParseException: 'Add value to collection of type 'System.Windows.Controls.UIElementCollection' threw an exception.' Line number '17' and line position '10'.
---> System.DllNotFoundException: Unable to load DLL 'wpfgfx_cor3.dll' or one of its dependencies: The specified procedure could not be found. (0x8007007F)
at System.Windows.Media.MediaContextNotificationWindow.MilContent_AttachToHwnd(IntPtr hwnd)
at System.Windows.Media.MediaContextNotificationWindow..ctor(MediaContext ownerMediaContext)
at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
at System.Windows.Media.Visual.VerifyAPIReadWrite()
at System.Windows.Media.VisualCollection.Add(Visual visual)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement element)
at System.Windows.Controls.UIElementCollection.Add(UIElement element)
at System.Windows.Controls.UIElementCollection.System.Collections.IList.Add(Object value)
at System.Xaml.Schema.XamlTypeInvoker.AddToCollection(Object instance, Object item)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.Add(Object collection, XamlType collectionType, Object value, XamlType valueXamlType)
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at PieterP.ScoreSheet.GUI.Views.MainWindow.InitializeComponent() in C:\Users\skydr\source\repos\scoresheet\src\gui\PieterP.ScoreSheet.GUI\Views\MainWindow.xaml:line 1
at PieterP.ScoreSheet.GUI.Views.MainWindow..ctor() in C:\Users\skydr\source\repos\scoresheet\src\gui\PieterP.ScoreSheet.GUI\Views\MainWindow.xaml.cs:line 26
at PieterP.ScoreSheet.GUI.App.OnStartup(StartupEventArgs e) in C:\Users\skydr\source\repos\scoresheet\src\gui\PieterP.ScoreSheet.GUI\App.xaml.cs:line 52
at System.Windows.Application.<.ctor>b__1_0(Object unused)
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)

Apparently, the problem is caused because it cannot load wpfgfx_cor3.dll, which sounds like one of the runtime dlls. I don't know whether the problem is Windows 8.1 or x86 (or the combination), or something else... In any case, the .NET Core Runtime and the .NET Core Desktop pack both installed correctly.


@scalablecory commented on Mon Oct 07 2019

@grubioe @dagood


@dagood commented on Mon Oct 07 2019

Moving to WPF. (Unfortunately not the GitHub way because I don't have write permission there. 😕)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions