In The League
In The League

Reputation: 1

The Debugger was configured to use the Desktop CLR (.NET Framework), but the target process loaded the CoreCLR (.NET Core) runtime

I have a project which is C# Class library (.NET Framework) a .dll, and im loading inside it the Revit API libraries in the references, when i run it without debugging (Ctrl + F5) everything goes well, but when i run the debugger i get this error message:

"A fetal error has occured and debugging needs to be terminated. The devugger was configured to use the DesktopCLR (.NET Framework) Managed debugger, but the target process loaded the CoreCLR (.NET Core) runtime. To debug this project configure it to use the 'Managed (CoreCLR)' debugger."

**and i also get this warning when i build the project :

1> C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: Project file item includes which caused reference "C:\Program Files\Autodesk\Revit 2025\CefSharp.Core.Runtime.dll". 1> C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2412,5): warning MSB3277: RevitAPIUI

[[enter image description here](https://i.sstatic.net/rUmDAUuk.png)](https://i.sstatic.net/2IJWPxM6.png)

I hope someone can help since im stuck for days in this issue and no solution i found

I tried various solutions i found on the internet but none of it worked, which are :

1- clean the project and rebuild it. 2- deleted .bin .obj files and rebuild the project. 3- Edited the Configuration manager from Any CPU to x64.

None of the aboce solutions worked

Upvotes: -2

Views: 277

Answers (1)

Jeremy Tammik
Jeremy Tammik

Reputation: 8339

I suggest you take a look at the getting started with the Revit API material and the Developer Guide instructions in the Revit online help. Please note that you cannot create a stand-alone Revit add-in. Revit add-ins are add-ins. That means that they are added into a running session of Revit. The Revit API cannot be used stand-alone outside of a running session of Revit.exe.

Upvotes: -1

Related Questions