@mzjensen Just like @john_pierson mentioned, I have used a little bit different approach to my packages but one that should actually be a good fit for what you are doing. Here’s what the difference really is between the two approaches. Let’s call them:
archi-lab.net - Shared Project Approach
- rhythm- Invoke Method Approach
With the Shared Project Approach, I am creating a version of the package that is built against specific version of Revit, or in your case that would be CAD etc. Because I have multiple Visual Studio projects, I can reference different Nuget pacakges or DLLs to build the project against. That also gives me a quick debugging opportunity in Visual Studio. As I am typing code, Visual Studio checks it against specific version of the DLL/API so it won’t build the project if I try using an API that no longer exists. It makes it super easy to spot deprecated functions etc. Problem is that with that approach, I end up with a set of DLLs for Revit 2020, Revit 2021 and Revit 2022. I have to post and manage each of these versions in the Package Manager, and since now I have multiple flavors of the package users that download it from the Package Manager can and will install Revit 2020 flavor for their 2021 Revit. It happened and will continue to happen, as people either don’t know about these different flavors or just miss it. I still think, it’s a problem or an improvement for the Dynamo development team to find a solution to. This kind of approach should be supported by the package manager.
Anyways, the other approach that @john_pierson is using is also a valid approach, and results in a single package that should work with all flavors of Revit/CAD. I don’t have anything against it. It makes spotting API issues a little less obvious as you kind of have to “know” about them as opposed to letting Visual Studio just tell you about them. It also means that you end up with just one DLL that is built against a specific version of Revit, let’s say 2022, so when that package is downloaded and installed in Revit 2021, you will get Dynamo errors complaining about the version mismatch. It’s purely aesthetic as that error doesn’t do much, but I had enough users complain about it, or ask about it, that I decided to clean that up. Overall it’s a totally valid approach, and makes perfect sense. I used version of that in the past.
Hope this helps.
Here’s source code for archi-lab.net GitHub - ksobon/archilab: this is archi-lab.net dynamo repo