diff --git a/Build/.nuke/build.schema.json b/Build/.nuke/build.schema.json index f5d4081..6b95499 100644 --- a/Build/.nuke/build.schema.json +++ b/Build/.nuke/build.schema.json @@ -273,6 +273,16 @@ "ReleasePackageBuilder": { "type": "boolean" }, + "RevitContextIsolation": { + "type": "boolean" + }, + "RevitContextName": { + "type": "string" + }, + "RevitContextVersion": { + "type": "integer", + "format": "int32" + }, "SignFile": { "type": "string", "default": "Secrets must be entered via 'nuke :secrets [profile]'" diff --git a/Build/Build.csproj b/Build/Build.csproj index 91151d4..dba8d6d 100644 --- a/Build/Build.csproj +++ b/Build/Build.csproj @@ -1,7 +1,7 @@  Exe - net8.0 + net10.0 CS0649;CS0169 . diff --git a/CHANGELOG.md b/CHANGELOG.md index df74425..1e576dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.3.0] / 2026-05-10 - 2026-08-28 +### Features +- Update installation folder to `AppData` to support `Revit 2027` change location. +- Update project to use `ricaun.Revit.Sdk` with `TargetFrameworks`. +### Removed +- Remove support for Revit 2018 and 2017. +### Updated +- Update `ricaun.Revit.UI` to `0.9.1`. +- Update `AppName` to show `ContextNumber` in the `GetInfo` method. +### Build +- Update `ricaun.Nuke.PackageBuilder` to version `1.12.0` to change installation folder to `AppData`. +- Update `csproj` to `net10` target framework. + ## [1.2.0] / 2025-03-21 ### Features - Support `tiff` image files. @@ -74,6 +87,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [x] AutoUpdater [vNext]: ../../compare/1.0.0...HEAD +[1.3.0]: ../../compare/1.2.0...1.3.0 [1.2.0]: ../../compare/1.1.1...1.2.0 [1.1.1]: ../../compare/1.1.0...1.1.1 [1.1.0]: ../../compare/1.0.6...1.1.0 diff --git a/Directory.Build.props b/Directory.Build.props index 22481b2..e548d75 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,5 @@ - 1.2.0 + 1.3.0 \ No newline at end of file diff --git a/README.md b/README.md index 98937e8..a90b5df 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # RevitAddin.CommandLoader -[![Revit 2017](https://img.shields.io/badge/Revit-2017+-blue.svg)](../..) -[![Visual Studio 2022](https://img.shields.io/badge/Visual%20Studio-2022-blue)](../..) +[![Revit 2019](https://img.shields.io/badge/Revit-2019+-blue.svg)](../..) +[![Visual Studio 2026](https://img.shields.io/badge/Visual%20Studio-2026-blue)](../..) [![Nuke](https://img.shields.io/badge/Nuke-Build-blue)](https://nuke.build/) [![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) -[![Build](../../actions/workflows/Build.yml/badge.svg)](../../actions) +[![Build](https://github.com/ricaun-io/RevitAddin.CommandLoader/actions/workflows/Build.yml/badge.svg)](https://github.com/ricaun-io/RevitAddin.CommandLoader/actions) ![CommandLoader](https://github.com/ricaun-io/RevitAddin.CommandLoader/assets/12437519/f54aadb6-5df7-4586-ad08-d4b9e85524d7) @@ -93,7 +93,12 @@ Just copy the `gist` link in the `RevitAddin.CommandLoader` compiler and execute ## Installation -* Download and install [RevitAddin.CommandLoader.exe](../../releases/latest/download/RevitAddin.CommandLoader.zip) +Install bundle using the installer [RevitAddin.CommandLoader.exe](https://github.com/ricaun-io/RevitAddin.CommandLoader/releases/latest/download/RevitAddin.CommandLoader.zip) or using [AppBundleTool](https://github.com/ricaun-io/ricaun.AppBundleTool) with the following command: +```shell +AppBundleTool -a https://github.com/ricaun-io/RevitAddin.CommandLoader/releases/latest/download/RevitAddin.CommandLoader.bundle.zip -i +``` + +The `RevitAddin.CommandLoader.bundle` is installed in the `%AppData%\Autodesk\ApplicationPlugins\RevitAddin.CommandLoader.bundle` folder. ## Video diff --git a/RevitAddin.CommandLoader.Tests/RevitAddin.CommandLoader.Tests.csproj b/RevitAddin.CommandLoader.Tests/RevitAddin.CommandLoader.Tests.csproj index d5d652d..f92c89e 100644 --- a/RevitAddin.CommandLoader.Tests/RevitAddin.CommandLoader.Tests.csproj +++ b/RevitAddin.CommandLoader.Tests/RevitAddin.CommandLoader.Tests.csproj @@ -1,79 +1,8 @@ - + false - Latest - Debug 2017;2017;Debug 2021;2021;2025;Debug 2025 - - - - - - - 2017 - net46 - - - - - 2018 - net46 - - - - - 2019 - net47 - - - - - 2020 - net47 - - - - - 2021 - net48 - - - - - 2022 - net48 - - - - - 2024 - net48 - - - - - 2025 - net8.0-windows - - - - - 2017 - net46 - - - - - - - REVIT$(RevitVersion) - - - - - true - true - false + 2027;2026;2025;2024;2023;2022;2021;2020;2019 @@ -86,7 +15,8 @@ - + + diff --git a/RevitAddin.CommandLoader.sln b/RevitAddin.CommandLoader.sln deleted file mode 100644 index 11a01fb..0000000 --- a/RevitAddin.CommandLoader.sln +++ /dev/null @@ -1,68 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33424.131 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RevitAddin.CommandLoader", "RevitAddin.CommandLoader\RevitAddin.CommandLoader.csproj", "{82070359-36DA-4441-A59D-9018B6A8B348}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "Build\Build.csproj", "{34853418-411C-4B27-82AF-DDE5309AEE10}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{E6AC2FD0-D488-44FE-9390-3CADFB37E99D}" - ProjectSection(SolutionItems) = preProject - CHANGELOG.md = CHANGELOG.md - Directory.Build.props = Directory.Build.props - LICENSE = LICENSE - README.md = README.md - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RevitAddin.CommandLoader.Tests", "RevitAddin.CommandLoader.Tests\RevitAddin.CommandLoader.Tests.csproj", "{42C706AF-0255-4E98-A5A0-C043FA7B0496}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - 2017|Any CPU = 2017|Any CPU - 2021|Any CPU = 2021|Any CPU - 2025|Any CPU = 2025|Any CPU - Debug 2017|Any CPU = Debug 2017|Any CPU - Debug 2021|Any CPU = Debug 2021|Any CPU - Debug 2025|Any CPU = Debug 2025|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {82070359-36DA-4441-A59D-9018B6A8B348}.2017|Any CPU.ActiveCfg = 2017|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.2017|Any CPU.Build.0 = 2017|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.2021|Any CPU.ActiveCfg = 2021|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.2021|Any CPU.Build.0 = 2021|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.2025|Any CPU.ActiveCfg = 2025|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.2025|Any CPU.Build.0 = 2025|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.Debug 2017|Any CPU.ActiveCfg = Debug 2017|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.Debug 2017|Any CPU.Build.0 = Debug 2017|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.Debug 2021|Any CPU.ActiveCfg = Debug 2021|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.Debug 2021|Any CPU.Build.0 = Debug 2021|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.Debug 2025|Any CPU.ActiveCfg = Debug 2025|Any CPU - {82070359-36DA-4441-A59D-9018B6A8B348}.Debug 2025|Any CPU.Build.0 = Debug 2025|Any CPU - {34853418-411C-4B27-82AF-DDE5309AEE10}.2017|Any CPU.ActiveCfg = Release|Any CPU - {34853418-411C-4B27-82AF-DDE5309AEE10}.2021|Any CPU.ActiveCfg = Release|Any CPU - {34853418-411C-4B27-82AF-DDE5309AEE10}.2025|Any CPU.ActiveCfg = Debug|Any CPU - {34853418-411C-4B27-82AF-DDE5309AEE10}.2025|Any CPU.Build.0 = Debug|Any CPU - {34853418-411C-4B27-82AF-DDE5309AEE10}.Debug 2017|Any CPU.ActiveCfg = Debug|Any CPU - {34853418-411C-4B27-82AF-DDE5309AEE10}.Debug 2021|Any CPU.ActiveCfg = Debug|Any CPU - {34853418-411C-4B27-82AF-DDE5309AEE10}.Debug 2025|Any CPU.ActiveCfg = Debug|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.2017|Any CPU.ActiveCfg = 2017|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.2017|Any CPU.Build.0 = 2017|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.2021|Any CPU.ActiveCfg = 2021|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.2021|Any CPU.Build.0 = 2021|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.2025|Any CPU.ActiveCfg = 2025|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.2025|Any CPU.Build.0 = 2025|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.Debug 2017|Any CPU.ActiveCfg = Debug|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.Debug 2017|Any CPU.Build.0 = Debug|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.Debug 2021|Any CPU.ActiveCfg = Debug 2021|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.Debug 2021|Any CPU.Build.0 = Debug 2021|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.Debug 2025|Any CPU.ActiveCfg = Debug 2025|Any CPU - {42C706AF-0255-4E98-A5A0-C043FA7B0496}.Debug 2025|Any CPU.Build.0 = Debug 2025|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {98A9768C-D450-4125-8057-441B3C106F5E} - EndGlobalSection -EndGlobal diff --git a/RevitAddin.CommandLoader.slnx b/RevitAddin.CommandLoader.slnx new file mode 100644 index 0000000..46a70a9 --- /dev/null +++ b/RevitAddin.CommandLoader.slnx @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/RevitAddin.CommandLoader/Extensions/AppName.cs b/RevitAddin.CommandLoader/Extensions/AppName.cs index 273a01e..5f9a130 100644 --- a/RevitAddin.CommandLoader/Extensions/AppName.cs +++ b/RevitAddin.CommandLoader/Extensions/AppName.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Reflection; namespace RevitAddin.CommandLoader.Extensions @@ -22,7 +23,8 @@ public static string GetInfo() var assemblyName = assembly.GetName(); var result = $"App: {assemblyName.Name}\n"; result += $"Version: {assemblyName.Version.ToString(3)}\n"; - result += $"Location: {assembly.Location}"; + result += $"Location: {assembly.Location}\n"; + result += $"ContextNumber: {GetContextNumber()}"; return result; } @@ -31,5 +33,15 @@ public static string GetUri() { return "https://github.com/ricaun-io/RevitAddin.CommandLoader"; } + + private static string GetContextNumber() + { +#if NET + var context = System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(typeof(AppName).Assembly); + return context.ToString().Split('#').LastOrDefault(); +#else + return "0"; +#endif + } } } diff --git a/RevitAddin.CommandLoader/RevitAddin.CommandLoader.csproj b/RevitAddin.CommandLoader/RevitAddin.CommandLoader.csproj index 3775478..f533ca3 100644 --- a/RevitAddin.CommandLoader/RevitAddin.CommandLoader.csproj +++ b/RevitAddin.CommandLoader/RevitAddin.CommandLoader.csproj @@ -1,109 +1,9 @@ - - + - Library - AnyCPU + Debug true - latest - false - None - Debug 2017;2017;Debug 2021;2021;2025;Debug 2025 - - - - - - - 2017 - net46 - - - - - 2018 - net46 - - - - - 2019 - net47 - - - - - 2020 - net47 - - - - - 2021 - net48 - - - - - 2022 - net48 - - - - - 2023 - net48 - - - - - 2024 - net48 - - - - - 2025 - net8.0-windows - - - - - 2017 - net46 - - - - - - - true - true - false - - - - - true - bin\Release\$(RevitVersion)\ - REVIT$(RevitVersion) - MSB3052 - None - - - - - true - bin\Debug\ - DEBUG;TRACE;REVIT$(RevitVersion) - Full - - - - - $(RevitVersion) - Program - C:\Program Files\Autodesk\Revit $(DebugRevitVersion)\Revit.exe + 2027;2026;2025;2024;2023;2022;2021;2020;2019 @@ -111,39 +11,21 @@ {82070359-36DA-4441-A59D-9018B6A8B348} - - - - - false - $([MSBuild]::Divide($([System.DateTime]::Now.TimeOfDay.TotalSeconds), 4).ToString('F0')) - .Dev.$(Version).$(Revision) - - ricaun Luiz Henrique Cassettari Revit Plugin Description for $(PackageId). - $([System.DateTime]::Now.ToString('yyyy')) - - - - $(PackageId)$(PackageAssemblyVersion) - $(PackageId) - Copyright © $(CopyrightYears) $(Company) - - - - + + @@ -171,20 +53,16 @@ - + - - - - - - - + + + diff --git a/RevitAddin.CommandLoader/Services/GistGithubUtils.cs b/RevitAddin.CommandLoader/Services/GistGithubUtils.cs index 38bd066..abfdbd6 100644 --- a/RevitAddin.CommandLoader/Services/GistGithubUtils.cs +++ b/RevitAddin.CommandLoader/Services/GistGithubUtils.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; namespace RevitAddin.CommandLoader.Services { @@ -102,10 +103,21 @@ private static string GetGistString(string id) private static string GetString(string url) { - using (var client = new System.Net.WebClient()) + //using (var client = new System.Net.WebClient()) + //{ + // client.Headers.Add(System.Net.HttpRequestHeader.UserAgent, typeof(GistGithubUtils).Assembly.GetName().Name); + // return client.DownloadString(url); + //} + using (var client = new System.Net.Http.HttpClient()) { - client.Headers.Add(System.Net.HttpRequestHeader.UserAgent, typeof(GistGithubUtils).Assembly.GetName().Name); - return client.DownloadString(url); + client.DefaultRequestHeaders.Add("User-Agent", typeof(GistGithubUtils).Assembly.GetName().Name); + var task = Task.Run(async () => + { + var response = await client.GetAsync(url); + response.EnsureSuccessStatusCode(); + return await response.Content.ReadAsStringAsync(); + }); + return task.GetAwaiter().GetResult(); } } }