Update Dynamo package from .dll when making changes


it is the first time I am creating a Dynamo package as a C# Project. I was curious if there is a way to automatically update the library once I rebuild the solution. At the moment, I am usually doing the following:

  1. Remove the package from Settings->Manage Nodes and Package Paths

  1. Close both Dynamo and Revit

  2. Build the solution

  3. Open Revit, Dynamo and add the .dll again.

When working on an External Revit application, I usually have Revit linked as an external application in Visual Studio and I also have a simple batch file, copying all the add-in files to the program directories. This allows me to update the add in by just clicking on Play and Pause in the VS project:

Is there a way to do something similar with Dynamo, so that I wouldn’t need to restart both Revit and Dynamo each time the project is rebuild. The problem is I can’t link Dynamo as an external app alone (without Revit) and I am not sure if there is a simple copy-paste method to add the C# Zero-Touch library.


As far as I know…

Dynamo marks the dll as in use once you launch it and stores the class and all it’s goodies in that Dynamo environment. This is maintained in whatever state it was loaded for the duration of the Revit session. As such you can’t update the output of the DLL without restarting Revit.

If you aren’t interacting with the Revit API, you could just build for Dynamo sandbox, which would move to only Dynamo needing to restart.

1 Like

I thought so… I tried linking Revit as an external app and I managed to get one step closer, the program starts automatically upon rebuilding the solution and at least I dont need to manually remove and add the package each time. The problem is I cannot break the debug process:

As I see this message:

When creating a Revit add-in this actually works, when you break the debug, the program remains idle and once you hit play for the external app, it works with all the changes already. So I think going around this error might let you do something similar with Dynamo as well, but I’m not sure what’s the issue :frowning: I thought I have the .net debugger set: