Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Outside NuGet Packages

coopgodd
Contributor

Outside NuGet Packages

coopgodd
Contributor
Contributor

Hey everyone,

I'm looking to use some NuGet packages in my Revit Add-in application. However, I can't seem to find a way to do this. Even when I download the packages Revit crashes and gives the following error:

 System.IO.FileNotFoundException

 Has anybody experienced this issue and can shed some light on where I need to go to fix this issue. For example, I'm trying to install the package npgsql.

 

Much appreciated!

Reply
490 Views
5 Replies
Replies (5)

ricaun
Advisor
Advisor

Did you put the dll package in the same folder when testing in Revit? I suppose you are copying your plugin .dll and .addin to tests in Revit, you need to copy the 'npgsql' dll as well.

 

Usually, FileNotFoundException happens when the dll is not found...

 

But could be another thing, sometimes is kinda tricky to work with third-party packages and Revit.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

coopgodd
Contributor
Contributor

Thanks for the reply!

Add the ddl into the revit folder or into the project/application folder? Im confused...

 

Thanks!

0 Likes

moturi.magati.george
Autodesk
Autodesk

Hi @coopgodd,

 

Once you create you plugin and build it, you need to copy both your manifest file and plugin dll file to the location below.
Under Windows 10 - C:\ProgramData\Autodesk\Revit\Addins\20xx\ (The ProgramData folder is hidden by default)
Since you want to use external dll, you need to copy the same to the target folder above. I think setting CopyLocal to true in visual studio might have he same effect although I am not sure in your case.

  Moturi George,     Developer Advocacy and Support,  ADN Open

coopgodd
Contributor
Contributor

This isn’t working either unfortunately…

I tried manually placing it, the copy local setting, and I also tried the Embed Interop Types setting as well (which sounds like exactly what I need but does not function with my application…)

 

any further thoughts would be appreciated!

0 Likes

moturi.magati.george
Autodesk
Autodesk

Hi @coopgodd 

 

You can have a look at this thread and the replies below it. Hope it helps

https://stackoverflow.com/questions/68070423/installed-nuget-throws-system-io-filenotfoundexception

  Moturi George,     Developer Advocacy and Support,  ADN Open
0 Likes