mscorlib Not Found Error

mscorlib Not Found Error

coopgodd
Contributor Contributor
2,356 Views
3 Replies
Message 1 of 4

mscorlib Not Found Error

coopgodd
Contributor
Contributor

Hey everyone,

I'm having some trouble loading an outside package (npgsql) but it seems that Revit isn't unhappy about the package itself, but with mscorlib.dll. I continuously get this error whenever I try to use any outside package, but the rest of my application works just fine. 

 System.IO.FileNotFoundException

with the note that mscorlib.dll has caused this issue... (or that it's source is that file at least, I'm not quite sure if the system can even find it)

 

Any help would be much appriciated!

0 Likes
2,357 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni

Mscorlib is a standard .NET library and should be preinstalled. I expect Revit itself is also loading and using it. Maybe you set up your add-in in some weird way so that it requests a specific version and is unhappy with the one already loaded by Revit. Maybe you can perform some file loading analysis to determine whether Revit has already loaded it and what your add-in is doing to cause the problem, e.g., with Process Monitor and similar tools:

 

https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 4

mhannonQ65N2
Collaborator
Collaborator

You might be installing a version of the package that requires a different .NET framework (or it is a .NET Core package). Could you post more details?

Message 4 of 4

coopgodd
Contributor
Contributor

Hey there,

My project is using the .NET Framework 4.8 and I'm attempting to install npgsql.

I've downloaded npgsql from the nuget package manager inside of Visual Studio and I'm not quite sure which file to use as my reference (which .dll (at least I assume I need the .dll)).

Currently the folder Npgsql.6.0.7 looks like this:

- net5.0

- net6.0

- netcoreapp3.1

- netstandard2.0

- netstandard2.1

 

And I have no clue which to use, as I'm not seeing a .NET framework 4.8 folder....

 

Your help would be much appriciated!

0 Likes