Every version of a Revit API app must reference some DLLs that come with Revit’s releases.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-12.png)
Open the .sln of your API code. In Visual Studio’s Solution Explorer, see Properties.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-1.png)
One can see what Revit version an app was written for by the path of some of those references.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-13.png)
Remove Revit references from old Revit versions. (This step may not be necessary, because can uncheck in the Reference Manager.)
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-3.png)
Add Reference
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-4.png)
Add back the appropriate References by browsing to the file locations.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-5.png)
Caution! <RevitAPIUI.dll> and <RevitUIAPI.dll> are both in the same folder. Do not get dyslexic-ly confused!
![Image result for confused gif meme](https://media3.giphy.com/media/g01ZnwAUvutuK8GIQn/giphy.gif)
In the Properties of each DLL, set Copy Local to False.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-6.png)
If there are post-build events, update the instructions.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-7.png)
E.g.:copy "$(ProjectDir)bin\debug\myapp.dll" "C:/Users/All Users/Autodesk/Revit/Addins/2019"
Update Debug instructions if needed.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-8.png)
In Application, update .NET Framework if needed. Get to that dialog by going the Properties of the project. See https://youtu.be/5JMUi218rTQ?t=48
![](https://revthat.com/wp-content/uploads/sites/10/2022/05/image-173x300.png)
![](https://revthat.com/wp-content/uploads/sites/10/2022/05/image-1-300x291.png)
Build Solution, and if there are no problems, it should compile.
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-9.png)
![](https://revthat.com/wp-content/uploads/sites/10/2020/01/image-11.png)