Script doesn't work after use "Revit Release" configuration

Script doesn't work after use "Revit Release" configuration

jw.vanasselt
Advocate Advocate
282 Views
3 Replies
Message 1 of 4

Script doesn't work after use "Revit Release" configuration

jw.vanasselt
Advocate
Advocate

Hi all,

 

I running into a strange problem.
We have a solution and we have set configuration settings in it.

I used this video made by @ricaun 

 

Update your RevitAddin project to work with Multiple Revit Version - YouTube

 

 

<?xml version="1.0" encoding="utf-8"?>

<Project Sdk="Microsoft.NET.Sdk">

	<!-- Projectinformatie -->
	<PropertyGroup>
		<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
		<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
		<OutputType>Library</OutputType>
		<ProjectGuid>{CC4ED8F9-47BC-4AAC-AB22-93E9CD7735C3}</ProjectGuid>
		<Configurations>Debug 2020;Debug 2021;Debug 2022;Debug 2023;Debug 2024;Revit Release</Configurations>
	</PropertyGroup>

	<!-- Revit versie -->
	<Choose>
		<When Condition="$(Configuration.Contains('2020'))">
			<PropertyGroup>
				<RevitVersion>2020</RevitVersion>
				<TargetFramework>net48</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>
		<When Condition="$(Configuration.Contains('2024'))">
			<PropertyGroup>
				<RevitVersion>2024</RevitVersion>
				<TargetFramework>net48</TargetFramework>
			</PropertyGroup>
		</When>
		<When Condition="$(Configuration.Contains('Revit Release'))">
			<PropertyGroup>
				<RevitVersion>2024</RevitVersion>
				<TargetFramework>net48</TargetFramework>
			</PropertyGroup>
		</When>		
	</Choose>

 

 

This did work fine, I added 2024 to the configuration.
When I use the "Revit Release" configuration some tools in Revit 2021 doesn't work anymore.

 

When I use the Build, there are some warnings but no errors.

Any ideas?

 

Accepted solutions (1)
283 Views
3 Replies
Replies (3)
Message 2 of 4

jw.vanasselt
Advocate
Advocate

I found the problem. I don't have a configuration for each revit release...

 

0 Likes
Message 3 of 4

ricaun
Advisor
Advisor
Accepted solution

Yes! Your solution needs to have the proper configuration.

 

I usually use the configuration like the image:

ricaun_0-1696252763026.png

The Configurations 2018, 2019, 2020, 2021, 2022, 2023, and 2024 is Release version and the configuration with Debug is for debugging/development.

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 4 of 4

jw.vanasselt
Advocate
Advocate

Thanks for the quick reply!

That make sense, exactly I am lucky, didn't use the methode too much.

Glad to find out it now 🙂 

0 Likes