Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

System.Resources.Extensions not found

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
benjamin_decreusefond
267 Views, 4 Replies

System.Resources.Extensions not found

Hi ! 

For my company’s need, we need to have our revit plugin compatible with Revit 2023 and Revit 2025. When I run it with Revit 2025 everything works like a charm however, when I try to run it with Revit 2023 I have the ‘System.Resources.Extensions’ not found error. Here’s everything I’ve tried so far

- Add an assembly redirect from version 4.0.0.0 to my version like here 

- manually add the System.Resources.Extensions.dll in the Revit2023 folder where there are all DLL but it gives me another error that it can be loaded through reflection mode only

- manually add it in the plugin folder beside the plugin dll

- I of course added the System.Resources.Extensions to my project through NuGetPackage manager

 

I’m running out of ideas and I almost browsed all web pages. Does anyone already ran into this issue please ? 
btw: I’m compiling my project with .Net 4.8

 

regards !

4 REPLIES 4
Message 2 of 5

Have you contacted the author of the plug-in?  

Message 3 of 5

He is kind of missing lol 😂

I’m alone there
Message 4 of 5

I have the exact same issue with Inventor 2022. Also I have tried the approaches you mentioned, but no luck.

 

Thanks,

-Thilak Rao

Message 5 of 5

I managed to find out a solution !

Here's the step I followed:

- Remove System.Resources.Extensions from my project and manually add it as Reference from my local after downloading it

Added this code that allows me to load the DLL from its path

public class AssemblyResolver
{
    public static void RegisterAssemblyResolver(string baseDirectory)
    {
        AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
        {
            string assemblyPath = Path.Combine(baseDirectory, "System.Resources.Extensions.dll");
            
            Assembly asm = Assembly.LoadFrom(assemblyPath);
            return null;
        };
    }
}

Which I call from my app

string thisAssemblyPath = Assembly.GetExecutingAssembly().Location;
var basePath = Path.GetDirectoryName(thisAssemblyPath);
AssemblyResolver.RegisterAssemblyResolver(basePath);

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report