Multi version add-in using NuGet

Multi version add-in using NuGet

esatis
Advocate Advocate
2,377 Views
9 Replies
Message 1 of 10

Multi version add-in using NuGet

esatis
Advocate
Advocate

Hi, 

I am trying to configure multi-version VS project using this Revit_All_Main_Versions_API_x64 NuGet package. It comes with instructions posted below.

As I understand that I have to create multiple build configurations with name that includes Revit year version. 

Also have to add references in .vbproj file. 

 

But how to install multiple NuGet versions? 
When I update package from 2023 to 2022, it deletes the 2023 version and all .dll files.

 

File List:

RevitAPI.dll
RevitAPI.xml
RevitAPIUI.dll
RevitAPIUI.xml
AdWindows.dll
UIFramework.dll

Sets the references 'Copy Local' to False.

Example packages.config file content for multiple version filtering:
(Considers that your build configurations have the 'year' version of Revit in them.)


[snip]
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Revit_All_Main_Versions_API_x64" version="2011.0.0" targetFramework="net35"  allowedVersions="[2011.0.0,2012.0.0)" Condition="$(Configuration.Contains('2011'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2012.0.0" targetFramework="net40"  allowedVersions="[2012.0.0,2013.0.0)" Condition="$(Configuration.Contains('2012'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2013.0.0" targetFramework="net40"  allowedVersions="[2013.0.0,2014.0.0)" Condition="$(Configuration.Contains('2013'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2014.0.0" targetFramework="net40"  allowedVersions="[2014.0.0,2015.0.0)" Condition="$(Configuration.Contains('2014'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2015.0.0" targetFramework="net45"  allowedVersions="[2015.0.0,2016.0.0)" Condition="$(Configuration.Contains('2015'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2016.0.0" targetFramework="net45"  allowedVersions="[2016.0.0,2017.0.0)" Condition="$(Configuration.Contains('2016'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2017.0.0" targetFramework="net46"  allowedVersions="[2017.0.0,2018.0.0)" Condition="$(Configuration.Contains('2017'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2018.0.0" targetFramework="net46"  allowedVersions="[2018.0.0,2019.0.0)" Condition="$(Configuration.Contains('2018'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2019.0.0" targetFramework="net47"  allowedVersions="[2019.0.0,2020.0.0)" Condition="$(Configuration.Contains('2019'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2020.0.0" targetFramework="net47"  allowedVersions="[2020.0.0,2021.0.0)" Condition="$(Configuration.Contains('2020'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2021.0.0" targetFramework="net48"  allowedVersions="[2021.0.0,2022.0.0)" Condition="$(Configuration.Contains('2021'))"/>
  <package id="Revit_All_Main_Versions_API_x64" version="2022.0.0" targetFramework="net48"  allowedVersions="[2022.0.0,2023.0.0)" Condition="$(Configuration.Contains('2022'))"/>
</packages>
[/snip]

Example excerpt from a .vbproj file for Revit 2012/2013/2014 (they are all .NET 4.0):
(Note the net40 will vary across other versions, and the hint path will vary when updates
are applied, and due to the location of your NUGET 'packages' storage location.)

    <Reference Include="AdWindows"  Condition="$(Configuration.Contains('2012'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2012.0.0\lib\net40\AdWindows.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="RevitAPI"  Condition="$(Configuration.Contains('2012'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2012.0.0\lib\net40\RevitAPI.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="RevitAPIUI"  Condition="$(Configuration.Contains('2012'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2012.0.0\lib\net40\RevitAPIUI.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="UIFramework"  Condition="$(Configuration.Contains('2012'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2012.0.0\lib\net40\UIFramework.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="AdWindows"  Condition="$(Configuration.Contains('2013'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2013.0.0\lib\net40\AdWindows.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="RevitAPI"  Condition="$(Configuration.Contains('2013'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2013.0.0\lib\net40\RevitAPI.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="RevitAPIUI"  Condition="$(Configuration.Contains('2013'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2013.0.0\lib\net40\RevitAPIUI.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
	<Reference Include="UIFramework"  Condition="$(Configuration.Contains('2013'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2013.0.0\lib\net40\UIFramework.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="AdWindows"  Condition="$(Configuration.Contains('2014'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2014.0.0\lib\net40\AdWindows.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="RevitAPI"  Condition="$(Configuration.Contains('2014'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2014.0.0\lib\net40\RevitAPI.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="RevitAPIUI"  Condition="$(Configuration.Contains('2014'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2014.0.0\lib\net40\RevitAPIUI.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>
    <Reference Include="UIFramework"  Condition="$(Configuration.Contains('2014'))">
      <HintPath>..\Packages\Revit_All_Main_Versions_API_x64.2014.0.0\lib\net40\UIFramework.dll</HintPath>
      <SpecificVersion>False</SpecificVersion>
      <Private>False</Private>
    </Reference>

 

 

0 Likes
Accepted solutions (2)
2,378 Views
9 Replies
Replies (9)
Message 2 of 10

caroline.gitonga
Autodesk
Autodesk

Hi @esatis,

Kindly, would you mind checking this forum thread on compiling multiple versions of Revit.

https://forums.autodesk.com/t5/revit-api-forum/how-do-i-setup-visual-studio-to-compile-to-multiple-v...

Also, this has some important insights on NuGet package:

https://thebuildingcoder.typepad.com/blog/2020/01/devdays-online-and-add-in-migration.html#2.1

Carol Gitonga, Developer Advocacy and Support, ADN Open
Message 3 of 10

ricaun
Advisor
Advisor
Accepted solution

Hello @esatis 

 

This configuration looks a little old, in my case, I only add this in the csproj.

 

First, the configurations of the project with all the version your project need and with the Debug version as well.

<PropertyGroup>
  <Configurations>Debug 2018;2018;Debug 2019;2019;Debug 2020;2020;Debug 2021;2021;Debug 2022;2022;Debug 2023;2023</Configurations>
</PropertyGroup>

Here is a way to force depending on the configuration to select the TargetFramework and RevitVersion.

<!-- RevitVersion -->
<Choose>
  <When Condition="$(Configuration.Contains('2017'))">
    <PropertyGroup>
      <RevitVersion>2017</RevitVersion>
      <TargetFramework>net46</TargetFramework>
    </PropertyGroup>
  </When>
  <When Condition="$(Configuration.Contains('2018'))">
    <PropertyGroup>
      <RevitVersion>2018</RevitVersion>
      <TargetFramework>net46</TargetFramework>
    </PropertyGroup>
  </When>
  <When Condition="$(Configuration.Contains('2019'))">
    <PropertyGroup>
      <RevitVersion>2019</RevitVersion>
      <TargetFramework>net47</TargetFramework>
    </PropertyGroup>
  </When>
  <When Condition="$(Configuration.Contains('2020'))">
    <PropertyGroup>
      <RevitVersion>2020</RevitVersion>
      <TargetFramework>net47</TargetFramework>
    </PropertyGroup>
  </When>
  <When Condition="$(Configuration.Contains('2021'))">
    <PropertyGroup>
      <RevitVersion>2021</RevitVersion>
      <TargetFramework>net48</TargetFramework>
    </PropertyGroup>
  </When>
  <When Condition="$(Configuration.Contains('2022'))">
    <PropertyGroup>
      <RevitVersion>2022</RevitVersion>
      <TargetFramework>net48</TargetFramework>
    </PropertyGroup>
  </When>
  <When Condition="$(Configuration.Contains('2023'))">
    <PropertyGroup>
      <RevitVersion>2023</RevitVersion>
      <TargetFramework>net48</TargetFramework>
    </PropertyGroup>
  </When>
  <Otherwise>
    <PropertyGroup>
      <RevitVersion>2017</RevitVersion>
      <TargetFramework>net46</TargetFramework>
    </PropertyGroup>
  </Otherwise>
</Choose>

 

And the PackageReference with the version like Version="$(RevitVersion).*" to change with the RevitVersion.

 

<ItemGroup>
  <PackageReference Include="Revit_All_Main_Versions_API_x64" Version="$(RevitVersion).*" IncludeAssets="build; compile" PrivateAssets="All" />
</ItemGroup>

 

There are others configurations that you could add as well, here is a full project that uses this csproj.

 

 

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 4 of 10

esatis
Advocate
Advocate

Hi, @ricaun 

thank you for information! This approach seems nice!

I kind of implemented this but with some hiccups.

1. The Batch build works, but Debug throws error:

A project with an Output Type of Class Library cannot be
started directly,
In order to debug this project, add an executable project to
this solution which references the library project. Set the
executable project as the startup project.

2. Packages have these yellow exclamation marks. Build is successful though so I just have to ignore them.

esatis_0-1678553807217.png

3.  When I switch between configuration VS throws error:

Current solution contains incorrect configuration mappings. It may cause projects to not work correctly. Open the Configuration Manager to fix them.

 

0 Likes
Message 5 of 10

ricaun
Advisor
Advisor

1. Related to the start Debug: probably your debug program is not configured, this could do the trick.

  <!-- DebugRevitVersion -->
  <PropertyGroup Condition="$(Configuration.Contains('Debug'))">
    <DebugRevitVersion>$(RevitVersion)</DebugRevitVersion>
    <StartAction>Program</StartAction>
    <StartProgram>C:\Program Files\Autodesk\Revit $(DebugRevitVersion)\Revit.exe</StartProgram>
  </PropertyGroup>

 

2. Usually the yellow part is fixed if you close and open the Visual Studio, if you changed the csproj sometimes the Visual Studio does not refresh/regenerate.

 

3. You need to open the Configuration Manager and check if everything is right, if you add the configuration directly in the csproj, Visual Studio could be confusing related to where to use this configuration in the Solution.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 6 of 10

esatis
Advocate
Advocate

1. I had this set up. 

2. Also tried to restart VS, but still the triangle persists. 

3.  This is my .csproj, maybe you can spot something wrong, because there is something strange happening. Sometimes it batch-build, sometime it just builds one versions, sometimes 3 out of 4.  Maybe you can spot something:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
      None
    </ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
    <TargetFrameworkProfile />
    <Platforms />
  </PropertyGroup>

	<PropertyGroup>
		<OutputType>Library</OutputType>
		<UseWPF>true</UseWPF>
		<LangVersion>latest</LangVersion>
		<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
		<Configurations>Debug 2020;2020;Debug 2021;2021;Debug 2022;2022;Debug 2023;2023</Configurations>
	</PropertyGroup>

	<!-- RevitVersion -->
	<Choose>
		<When Condition="$(Configuration.Contains('2020'))">
			<PropertyGroup>
				<RevitVersion>2020</RevitVersion>
				<TargetFramework>net47</TargetFramework>
			
			</PropertyGroup>
		</When>
		<When Condition="$(Configuration.Contains('2021'))">
			<PropertyGroup>
				<RevitVersion>2021</RevitVersion>
				<TargetFramework>net48</TargetFramework>
				
			</PropertyGroup>
		</When>
		<When Condition="$(Configuration.Contains('2022'))">
			<PropertyGroup>
				<RevitVersion>2022</RevitVersion>
				<TargetFramework>net48</TargetFramework>
			
			</PropertyGroup>
		</When>
		<Otherwise>
			<PropertyGroup>
				<RevitVersion>2023</RevitVersion>
				<TargetFramework>net48</TargetFramework>
				
			</PropertyGroup>
		</Otherwise>
	</Choose>

	
	<PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{77E3E57E-DCC0-4E95-81F1-1CAA28655536}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>MyMultiVersionAddin</RootNamespace>
    <AssemblyName>MyMultiVersionAddin</AssemblyName>
	<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>

	<!-- Release -->
	<PropertyGroup Condition="!$(Configuration.Contains('Debug'))">
		<Optimize>true</Optimize>
		<OutputPath>bin\Release\$(RevitVersion)</OutputPath>
		<DefineConstants>REVIT$(RevitVersion)</DefineConstants>
		<NoWarn>MSB3052</NoWarn>
	
		<DebugType>None</DebugType>
	</PropertyGroup>

	<!-- Debug -->
	<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
		<DebugSymbols>true</DebugSymbols>
		<OutputPath>bin\Debug\</OutputPath>
		<DefineConstants>DEBUG;TRACE;REVIT$(RevitVersion)</DefineConstants>
		<DebugType>Full</DebugType>
	</PropertyGroup>

	<!-- DebugRevitVersion -->
	<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
		<DebugRevitVersion>$(RevitVersion)</DebugRevitVersion>
		<OutputPath>bin\Debug\</OutputPath>
		<ErrorReport>prompt</ErrorReport>
		<WarningLevel>4</WarningLevel>
		<StartAction>Program</StartAction>
		<StartProgram>$(ProgramW6432)\Autodesk\Revit $(DebugRevitVersion)\Revit.exe</StartProgram>
		
	</PropertyGroup>
	
  <ItemGroup>
    <Reference Include="PresentationCore" />
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.Composition" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Numerics" />
    <Reference Include="System.Web" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="App.cs" />
    <Compile Include="CheckedListBoxHelper.cs" />
    <Compile Include="entitlementCheck.cs" />
    <Compile Include="Command.cs" />
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
      <DependentUpon>Settings.settings</DependentUpon>
    </Compile>
    <Compile Include="Settings_form.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Settings_form.Designer.cs">
      <DependentUpon>Settings_form.cs</DependentUpon>
    </Compile>
    <Compile Include="Toolbox_msg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Toolbox_msg.Designer.cs">
      <DependentUpon>Toolbox_msg.cs</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="MyMultiVersionAddin.addin" />
    <Resource Include="Resources\test_button.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Settings_form.resx">
      <DependentUpon>Settings_form.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Toolbox_msg.resx">
      <DependentUpon>Toolbox_msg.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="RestSharp">
      <Version>106.12.0</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
	  <PackageReference Include="Revit_All_Main_Versions_API_x64" IncludeAssets="build; compile" PrivateAssets="All">
      <Version>$(RevitVersion).*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="System.Data.SqlClient">
      <Version>*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="System.Diagnostics.DiagnosticSource">
      <Version>*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="System.Net.Http">
      <Version>*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="System.Runtime">
      <Version>*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="System.Security.Cryptography.Algorithms">
      <Version>*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="System.Security.Cryptography.X509Certificates">
      <Version>*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="System.Text.Json">
      <Version>*</Version>
      <PrivateAssets>All</PrivateAssets>
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <PropertyGroup>
    <PostBuildEvent>if exist "$(AppData)\Autodesk\REVIT\Addins\2023" copy "$(ProjectDir)*.addin" "$(AppData)\Autodesk\REVIT\Addins\2023"
if exist "$(AppData)\Autodesk\REVIT\Addins\2023" copy "$(ProjectDir)$(OutputPath)*.dll" "$(AppData)\Autodesk\REVIT\Addins\2023"</PostBuildEvent>
  </PropertyGroup>
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <Target Name="AfterClean">
    <Delete Files="$(AppData)\Autodesk\REVIT\Addins\2023\MyMultiVersionAddin.addin" />
    <Delete Files="$(AppData)\Autodesk\REVIT\Addins\2023\MyMultiVersionAddin.dll" />
  </Target>
</Project>

 

0 Likes
Message 7 of 10

thomas
Advocate
Advocate

Do you need to support Revit versions 2011~2019? If I were you I would be more targeted, and stick to say a max span of 4 versions from the current, e.g. 2020~2023 (R2019 should in theory also be supported).

 

This will solve some of the complexities in your csproj, plus simplify the preprocessor directives you'll need to cope with breaking changes between the various APIs. 

 

One of the other possible causes of your Nuget issue is your target framework; if they differ between projects in a solution, or if a Nuget targets a higher framework then the one you're targeting, you'll see the warning signs. So you can't configure your csproj frameworks just for Revit, you need to do it for all NuGets; even more reason to be selective over which versions of Revit to target.

 

I suggest you target Revit 2023~2020. You also don't need to change frameworks. Just target 4.8 for all of them since its backwards compatible. End-users wont be able to run your app if they don't have this runtime installed, but its only going to be a problem for R2020. If they have higher versions installed then they'll have the runtime, if not either customize your installer or create a build configuration for it and revert to two deployments.

 

Also, you can use dependency injection to solve the problem of version compatibility and you wont have to bother with convoluted csproj conditions nor multiple deployments. I wrote a basic outline of how to do this here, just note I've cut corners for the sake of simplicity, so if you do it this way then: A) DI means DI, via the constructor. B) Use an IoC container (which is how I do implement this on live projects, then you won't need the implementation in the main project, nor forwarding methods or a singleton). C) Avoid using a singleton if you can, not unless you already are making static calls to the Revit API, then it makes no difference: 

https://twitter.com/Thomas__Mahon/status/1627198485668966401?s=20

Message 8 of 10

ricaun
Advisor
Advisor

Looks like ToolsVersion="14.0" does not work very well with PackageReference... Probably gonna be easier to update your csproj to use Sdk="Microsoft.NET.Sdk".

 

I know you gonna have issues with duplicate compiled files and attributes in the AssemblyInfo.

 

PostBuildEvent and Target Name="AfterClean" gonna need some change to make works as well.

 

Probably gonna create a video to help with that.

 

 

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 9 of 10

ricaun
Advisor
Advisor
Accepted solution

I created this video to convert an existing project to work with multi-version Revit.

 

I used the Jeremy Template: https://github.com/jeremytammik/VisualStudioRevitAddinWizard to create a project and convert it to work with Revit 2020, Revit 2021, Revit 2022, and Revit 2023.

 

 

Here is the project/solution: https://github.com/ricaun-io/RevitAddin.MultVersion

 

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 10 of 10

esatis
Advocate
Advocate

@ricaun yes! I just figured that out (to convert to SDK type project) yesterday and today after some tweaking your method works and is awesome! I used this blogpost Migrating to SDK format automatically to help with conversion.