Could not load file or assembly 'MaterialDesignColors, Culture=neutral' or one of its dependencies
See original GitHub issueHi am getting the following error when running my class library project.
“Could not load file or assembly ‘MaterialDesignColors, Culture=neutral’ or one of its dependencies. The system cannot find the file specified.”:“MaterialDesignColors, Culture=neutral”} System.Exception {System.IO.FileNotFoundException
I tried the below link forthe issue Could not load file or assembly 'MaterialDesignThemes.Wpf and the issue got fixed by adding the piece of code suggested as below .
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
ShadowAssist.SetShadowDepth(this, ShadowDepth.Depth0);
}
}
Is there any fix like above available for `MaterialDesignColors.dll ?
Note : All the dlls exists in same folder.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:39 (12 by maintainers)
Top Results From Across the Web
How to include MaterialDesignXamlToolkit to WPF class ...
FileNotFoundException : Could not load file or assembly 'MaterialDesignThemes.Wpf, Culture=neutral' or one of its dependencies. 3) My 'main ...
Read more >How to resolve “Could not load file or assembly … or one of its ...
When we use multiple versions of same assembly, it is more likely to encounter this runtime exception. It is easy to resolve provided...
Read more >WPF designer:Could not load file or assembly"..."or one of ...
I am getting the following error when I try to edit the main windows form. Could not load file or assembly "Dmd.Image, Version=3.6.0.0,...
Read more >XDG0062 Could not load file or assembly Version=6.0.0.1, ...
This problem occurs only for .NET Core 3.1 projects. The project is WPF .NET Core 3.1. Whenever I use Resource file like this ......
Read more >5 Steps to Getting Started With Material Design In XAML
Open the Package Manager and add the MaterialDesignThemes NuGet package to the WPF project. Markedly, this NuGet package has a dependency on another...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For folks still encountering this issue: this post by Carlos Anderson explains what’s going on:
And provides a solution similar to what @z3ke1r suggests:
This solved it for me.
Hi, I encountered the same issue while attempting to load an application. I built upon @hedinjke’s good work by removing unnecessary calls to the
Assembly.LoadFrom()
method. I noticed that your suggestion would lead to many unnecessary calls - in my case, the same assembly would be loaded 16 times or so.Instead of using a
foreach
structure to iterate over the list of assemblies returned by:I return a list of strings and use LINQ expressions to compare between the assemblies already loaded, and the ones required by the
AppDomain.CurrentDomain.AssemblyResolve
event.return Assembly.LoadFrom(assemblyToLoad);
AssemblyLoader.cs
EnumerateFiles.cs