Search code examples
c#.net-core.net-framework-versionrevit-api.net-standard-2.0

Unable to load Revit API in a project targeting .Net Standard 2.0


I am trying to use xUnitRevitUtils.2020 package which has a dependency on ModPlus.Revit.API.2020. My project target framework is .Net Standard 2.0. I receive the following warning: enter image description here

and when I try to run the application I get the following exception: enter image description here

and the application crashes. Is there any solution for this problem ?


Solution

  • you need to add the RevitAPI.dll reference to your project from Revit folder. see: https://knowledge.autodesk.com/search-result/caas/simplecontent/content/lesson-1-the-basic-plug.html