geberit / Revit.TestRunner

Unit Test Runner for Autodesk Revit
MIT License
84 stars 30 forks source link

Build Test project and having Revit running #17

Open michastei opened 2 years ago

michastei commented 2 years ago

Hi Tobias, I would like to develop test cases, build and run them using revit. Therefore I open Revit and start the TestRunner without having a Revit Project open. If I run the tests and rebuild the test project, there is the Error:

Severity Code Description Project File Line Suppression State Error Could not copy "obj\DEVELOPMENT\Test.dll" to "bin\DEVELOPMENT\Test.dll". Exceeded retry count of 10. Failed. The file is locked by: "Autodesk Revit (12124)" Test

By closing Revit, the Test.dll is not locked any more and the rebuild is possible. But it is time consuming to close and reopen Revit for each build process. Do you have a worklfow to avoid this behaviour? Thanks Michael

tobiasfloescher-geberit commented 2 years ago

Hi, this is a good point. I will take this in the backlog.

Jo-Meer commented 2 years ago

You can try to use .Net Hot reload.

I configured my IDE(Rider) to launch revit with the debugger attached. I am not sure if Visual Studio can do the same. But you can start revit manually and then attach the VS debugger.

For small code changes this works, but more invasive things like changing method signatures are not supported. But this definitely reduces the amount of revit restarts