Skip to content

Commit 07d1b9e

Browse files
authored
Change Host version to 2027 instead of 27 for package compatibility (#3136)
1 parent a516240 commit 07d1b9e

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.4
1+
0.7.5

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.7.5
2+
* Change Host version to 2026 instead of 26 for package compatibility
3+
14
## 0.7.4
25
* Add host product info for analytics
36

src/DynamoRevit/DynamoRevit.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,19 @@ private static RevitDynamoModel InitializeCoreModel(DynamoRevitCommandData comma
539539
var dynRevitVersion = Assembly.GetExecutingAssembly().GetName().Version;
540540
var revitVersion = Assembly.GetAssembly(typeof(Autodesk.Revit.DB.ElementId))?.GetName()?.Version;
541541

542-
HostAnalyticsInfo hostAnalyticsInfo = new HostAnalyticsInfo {
542+
int majorForDynamo;
543+
if (!int.TryParse(extCommandData.Application.Application.VersionNumber, out majorForDynamo))
544+
{
545+
majorForDynamo = revitVersion.Major;
546+
}
547+
Version revitVersionForDynamo = new Version(majorForDynamo, revitVersion.Minor, revitVersion.Build, revitVersion.Revision);
548+
549+
HostAnalyticsInfo hostAnalyticsInfo = new HostAnalyticsInfo
550+
{
543551
HostName = DYNAMO_REVIT_HOST_NAME,
544552
HostVersion = dynRevitVersion,
545553
HostProductName = REVIT_HOST_NAME,
546-
HostProductVersion = revitVersion
554+
HostProductVersion = revitVersionForDynamo
547555
};
548556

549557
var userDataFolder = Path.Combine(Environment.GetFolderPath(

0 commit comments

Comments
 (0)