Search code examples
apiautodesk-forgeautodesk-model-derivative

model.derivative-csharp-context.menu error


Working on https://github.com/shubhamgadekar5/model.derivative-csharp-context.menu 1. First opened "TranslatorServer.csproj"and changed the APP ID and SECRET got from Forge Developer Portal. visual studio downloaded packages but got the error as " project with an output type of Class Library cannot be started directly". enter image description here

To correct the error, used following steps but didn't worked.

  1. Then changed the output type of "CSSShellExtMenuHandler" from Class library to Windows application.

A. Then clicked debug using CSSShellExtMenuHandler, got the error as handler.exe not found.

B. clicked debug using Translator,uploaded revit file, got the error as "An excdeption of type 'System exception'occured in mscorib.dll but was not handled in user code"

Please suggest solution or Should I proceed after step 1 ignoring the class library error


Solution

  • You should not change the project settings, nor you can start the DLL directly. What you need to do is to register this component on you system using:

    regasm.exe CSShellExtContextMenuHandler.dll /codebase
    

    you can probably automate this task in your post build settings if you have admin priviledges and you want to.

    regasm.exe $(TargetPath) /codebase
    

    Set the TranslatorServer as Startup Project and launch the debugger without browser - i.e. Project Settings -> Web -> Don't open a page.

    Next, you can use your File Explorer to launch the process.