Search code examples
c#visual-studiogithubrevit-apirevit

Revit plugin DLLs downloaded from my GitHub don´t work. The ones compiled in my machine load fine


Sorry for the long title, I´ll try to be brief.

I have developed a collection of IExternalCommands for Revit 2020 using C# and Visual Studio. Also an IExternalApplication for a ribbon to contain them. They work like charm in my computer. I am using GitHub to store the project and I am testing what another person would need to do in order to install my plugins:

  • Downloading the DLLs from GitHub into my computer.
  • Copying the necessary .dlls and .addin files in one of the Revit addins folder %programdata%/Autodesk/...etc.
  • I open my Revit... my surprise is that I get the following error:

System.IO.FileLoadException

Could not load file or assembly 'file:///C:\ProgrammData\Autodesk\ApplicationPlugin...\ArpRibbon.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

But if I use the DLLs that have been compiled locally in my machine... it works! How is that possible? Does anyone know what am I doing wrong? I have been searching but can´t find anyone with a similar problem.

Many thanks in advance.


Solution

  • As from comment:

    Just a thought, but the file is loaded from internet. Maybe windows security mechanism kicks in. Can you browse to the file with explorer and right click to see it properties? There might be some security details there about disabling access due to external dll.

    This indeed proved to be the case.