Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pre Revit 2024 and Post Revit 2025 Builds

5 REPLIES 5
Reply
Message 1 of 6
retug_austin
1262 Views, 5 Replies

Pre Revit 2024 and Post Revit 2025 Builds

I just went through the process of upgrading a revit plugin from revit 2024 to revit 2025, following all of the recent documentation on the process.

 

All went well upgrading the plugin in to revit 2025, but to my surprise, going back to my old configuration (debug) as shown in the image below, it was booting up revit 2025 as I had told the "2025v1" configuration to do.

retug_austin_0-1715744163261.png

I would have thought that the "debug" configuration would have saved all the old start up commands and build events, starting up revit 2024. How do people handle this? Is there something simple I am missing for debugging and deploying in differing versions of revit (new to revit api development. Likely a very simple question)

 

Also, when I submit my app to the app store, do I need to submit (2) versions of the app, a folder for 2021-2024 versions of revit, and a separate folder for revit 2025?

5 REPLIES 5
Message 2 of 6
retug_austin
in reply to: retug_austin

I did some research on this topic, are people adding conditionals into their .csproj file like shown in the link below?
https://archi-lab.net/how-to-maintain-revit-plug-ins-for-multiple-versions/

 

Or is shared projects the play now?

https://archi-lab.net/how-to-maintain-revit-plugins-for-multiple-versions-continued/

 

Any best approaches/words of wisdom on maintaining multiple versions?

 

Thanks!

Message 3 of 6
retug_austin
in reply to: retug_austin

After some reading, I have decided to go the shared projects route (if it is what Konrad recommends, I figured I would give it a go). Is there any more in depth documentation on this process apart from this link, running into a few confusing issues shown below, likely just due to my lack of knowledge about configurations and version control in general. More info below.


https://archi-lab.net/how-to-maintain-revit-plugins-for-multiple-versions-continued/

What I have done, I now have a shared project and (2) separate projects.

 

retug_austin_0-1715869313870.png

I have modified the etabsRevitCnx2025.csproj file based on the recent .net 8.0 discussion updates.

 

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{1F1A4762-AA3C-490A-B8D6-CB925084462B}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>etabsRevitCnx2025</RootNamespace>
    <AssemblyName>etabsRevitCnx2025</AssemblyName>
	<TargetFrameworks>net8.0-windows</TargetFrameworks>
    <UseWPF>true</UseWPF>
    <FileAlignment>512</FileAlignment>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <Deterministic>true</Deterministic>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <None Include="App.config" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
	<Target Name="PostBuild" AfterTargets="PostBuildEvent">
		<Exec Command='
			  Copy "$(TargetDir)etabsRevitCnx.dll" "$(AppData)\Autodesk\Revit\Addins\2025"
              if exist "$(AppData)\Autodesk\REVIT\Addins\2025" copy "$(ProjectDir)*.addin" "$(AppData)\Autodesk\REVIT\Addins\2025 "
			  ' />	  
	</Target>
</Project>

 I am now getting an error that says "no project configuration matching the active solution configuration."

Opening the configuration manager, I am greeted with this screen.

retug_austin_1-1715869577323.png

What should I set configuration to for the 2025 version. Why can I not see "Debug" and "Release" like I can for the 2024 version?

retug_austin_2-1715869659368.png

 

Is this the correct way to handle shared projects?

 

Thanks!

Message 4 of 6
retug_austin
in reply to: retug_austin

Hopefully an easy question. Still playing with shared projects.

 

What I currently have, a shared project with (2) projects.

Both are set to the old .net framework 4.8 and both can be successfully built and debugged.

 

retug_austin_0-1716149706016.png

Changing one line in the etabsRevitCnx2025 .csproj file creates an error that I cant seem to fix:

<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>

to 

<TargetFramework>net8.0-windows</TargetFramework>

yields the following error screen:

retug_austin_1-1716150062851.png


opening the configuration menu, etabsRevitCnx2025 has disappeared from the listed projects.

retug_austin_2-1716150119252.png

prior to the one line of code change, the second project appeared in the list:

retug_austin_3-1716150239642.png

 

Any ideas what I can try to update? 

 



 

 

 

Message 5 of 6
retug_austin
in reply to: retug_austin

At this point, I would be happy to throw someone a little bit of $$$ if they wanted to help me debug this. 

Been trying to figure this out for the past week and making very little progress, starting to go a little cross-eyed staring at all these .csproj files and shared projects in visual studio 😵.

Message 6 of 6
retug_austin
in reply to: retug_austin

Well, after making that reply about 45 minutes ago, I think I finally figured it out. I will be sure to do a blog post on the topic. That was a wild ride :). Probably 15ish hours of tinkering, screwing up and reverting back.

 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report