I am attempting to compile Dynamo for Revit from source but running into a number of issues. Firstly I am getting a resgen.exe issue when compiling. The key on my registry is not found which should be pointing to this file. If I manually change the key, it still fails which prevents the build from completing.
Secondly, I have found the post below but its old and there is a comment that it might not be possible to build Dynamo from source. While the thread proved it was possible, I am not sure if this is true for newer versions. Can someone confirm?
Also @Zach_Kron added a link to the Dynamo GitHub with instructions for building Dynamo from source, but the page is blank? Is there another resource elsewhere?
I recently built D4R last week with these instructions. A few things to remember:
In order to run Dynamo for Revit, you must build Dynamo Core first
Make sure that you have the correct branches.
** The Dynamo Core and Dynamo for Revit branches must match. If you grab master from Dynamo Core, you need to grab the latest branch (Revit2016, Revit2017, or Revit2018; not one of the release candidate versions) from Dynamo4Revit
Thanks for the steps. The problem I’m getting which is preventing the build is as shown below. I’ve checked my registry and the key doesn’t exist, however I have the latest Windows SDK installed. I’ve added the key to the registry manually but it still isn’t found. Can you suggest a solution?
Also, there are 3 solution files in the Dynamo root master as shown below. The Dynamo_All outputs only assemblies and not an exe. Which one outputs the exe? Where are instructions which explain what the solutions files are and if they need to be built in a particular order?
With the Revit root master I am opening the DynamoRevit.2013.sln yet it too only outputs assemblies and no exe? Firstly, is this the correct solution to build from and as with the core, is there any particular order the solutions have to be built? Are there any resources which document Dynamo for Revit source with information explaining the different solution files and steps for interacting with and building it?
@Thomas_Mahon - Yes, “DynamoRevit.2013.sln” is correct solution to build from. D4R does not produce an exe. Follow the instructions on the DynamoRevit readme about creating a addin.
Essentially, you have 2 options for building:
Build Dynamo Core first, then D4R.
If you are building from master of Revit, you can run restorepackages.bat with admin privileges. You will not need to build Dynamo Core.
Regarding the addin, you can:
If you built Dynamo Core, run “DynamoAddInGenerator.exe” from the bin folder that gets generated.
Or you can make your own addin and place it in a location that Revit looks for addins (more instructions on the wiki)
You will need the following to build Dynamo from source:
-Microsoft Visual Studio 2015
-GitHub for Windows
-Microsoft .NET Framework 4.5.
-Microsoft DirectX (install from %GitHub%\Dynamo\tools\install\Extra\DirectX\DXSETUP.exe)
After Dynamo Core is build Run restorepackages.bat inside DynamoRevit.
Bulid DynamoRevit 2017
Add .addin file to %appdata%\Autodesk\Revit\Addins\2017\ with path: “[Your GitHub Folder]\Dynamo\bin\AnyCPU\Debug\Revit_2017\DynamoRevitVersionSelector.dll”
@Thomas_Mahon, @Kulkul 's description is an accurate one. It’s worth mentioning that you are possibly getting the regex error because of Visual Studio 2017. Please download 2015 and it should work just fine. Also, you have to run it in Admin mode since it will attempt to make some changes requiring admin rights.
@Racel somehow I couldn’t build the Revit2017 branch without first building Revit2018. I am not sure that’s desired behavior but it seems that some of the assemblies now have dependencies on 2018. Can someone check that out?
@Konrad_K_Sobon - I just built Revit2017 without having to build Revit2018 first. What errors/warnings are you seeing? And, what step are you having issues with?
We made a few modifications to our build process, but you should be able to build Revit2017 without Revit2018.
(Tip: You might want to try running VS in Admin mode)
Hey @Thomas_Mahon - I came across the exact issues as you did, but trying to build DynamoCore the other day.
It should be as simple as cloning the repo and clearly documented steps…this clearly isn’t the case.
To get Dynamo (Core at least) to build on Windows 10 and Visual Studio Community 2017, aside from the pre-requisites listed by @Kulkul, you also have to install the .NET 3.5 SDK add-on, search for “Visual Studio Installer” on your PC (comes with VS2017) and then add it from the “Individual components”.
As @Konrad_K_Sobon mentioned, installing Visual Studio 2015 is a good idea, seemed to have resolved some of the issues I was facing in VS2017 as well.