From 3b644e6d34dbb143e0c3a88e42a797f1e36884b4 Mon Sep 17 00:00:00 2001 From: Luiz Henrique Cassettari Date: Sat, 18 Nov 2023 22:17:23 -0300 Subject: [PATCH] Create `net7.0-windows` version for Revit 2025 --- .github/workflows/Build.yml | 2 +- Build/.nuke/build.schema.json | 142 +++++++++++++++++++ Build/Build.csproj | 2 +- CHANGELOG.md | 5 + Revit.Busy.Example/Revit.Busy.Example.csproj | 21 ++- Revit.Busy.Example/Revit/App.cs | 6 +- Revit.Busy/Revit.Busy.csproj | 61 +++----- 7 files changed, 189 insertions(+), 50 deletions(-) create mode 100644 Build/.nuke/build.schema.json diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 6bc2a77..8cb061a 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -22,7 +22,7 @@ jobs: - name: NuGet Setup uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: "NuGet Add Source Organization" run: if ("${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }}" -ne "") { dotnet nuget add source --username ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_USERNAME }} --password ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{github.repository_owner}}/index.json" } diff --git a/Build/.nuke/build.schema.json b/Build/.nuke/build.schema.json new file mode 100644 index 0000000..220ffb9 --- /dev/null +++ b/Build/.nuke/build.schema.json @@ -0,0 +1,142 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "$ref": "#/definitions/build", + "title": "Build Schema", + "definitions": { + "build": { + "type": "object", + "properties": { + "Continue": { + "type": "boolean", + "description": "Indicates to continue a previously failed build attempt" + }, + "Folder": { + "type": "string" + }, + "GitHubToken": { + "type": "string", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "Help": { + "type": "boolean", + "description": "Shows the help text for this build assembly" + }, + "Host": { + "type": "string", + "description": "Host for execution. Default is 'automatic'", + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "MainName": { + "type": "string" + }, + "NoLogo": { + "type": "boolean", + "description": "Disables displaying the NUKE logo" + }, + "NugetApiKey": { + "type": "string", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "NugetApiUrl": { + "type": "string", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "Partition": { + "type": "string", + "description": "Partition to use on CI" + }, + "Plan": { + "type": "boolean", + "description": "Shows the execution plan (HTML)" + }, + "Profile": { + "type": "array", + "description": "Defines the profiles to load", + "items": { + "type": "string" + } + }, + "ReleaseFolder": { + "type": "string" + }, + "ReleaseNameVersion": { + "type": "boolean" + }, + "Root": { + "type": "string", + "description": "Root directory during build execution" + }, + "SignFile": { + "type": "string", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "SignPassword": { + "type": "string", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "Skip": { + "type": "array", + "description": "List of targets to be skipped. Empty list skips all dependencies", + "items": { + "type": "string", + "enum": [ + "Build", + "Clean", + "Compile", + "GitRelease", + "Pack", + "Release", + "Sign" + ] + } + }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" + }, + "Target": { + "type": "array", + "description": "List of targets to be invoked. Default is '{default_target}'", + "items": { + "type": "string", + "enum": [ + "Build", + "Clean", + "Compile", + "GitRelease", + "Pack", + "Release", + "Sign" + ] + } + }, + "Verbosity": { + "type": "string", + "description": "Logging verbosity during build execution. Default is 'Normal'", + "enum": [ + "Minimal", + "Normal", + "Quiet", + "Verbose" + ] + } + } + } + } +} diff --git a/Build/Build.csproj b/Build/Build.csproj index a67ae4e..8148d40 100644 --- a/Build/Build.csproj +++ b/Build/Build.csproj @@ -1,7 +1,7 @@  Exe - net6.0 + net7.0 CS0649;CS0169 . diff --git a/CHANGELOG.md b/CHANGELOG.md index 50ec13e..3b6540d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ 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). +## [0.2.0] / 2023-11-18 +### Features +- Create `net7.0-windows` version for Revit 2025 + ## [0.1.2] / 2023-02-22 ### Features - `RevitBusyService` - start busy @@ -23,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. [vNext]: ../../compare/1.0.0...HEAD [1.0.0]: ../../compare/1.0.0 +[0.2.0]: ../../compare/0.1.2...0.2.0 [0.1.2]: ../../compare/0.1.1...0.1.2 [0.1.1]: ../../compare/0.1.0...0.1.1 [0.1.0]: ../../compare/0.1.0 \ No newline at end of file diff --git a/Revit.Busy.Example/Revit.Busy.Example.csproj b/Revit.Busy.Example/Revit.Busy.Example.csproj index 5c18cd2..53bb09f 100644 --- a/Revit.Busy.Example/Revit.Busy.Example.csproj +++ b/Revit.Busy.Example/Revit.Busy.Example.csproj @@ -6,7 +6,7 @@ AnyCPU true latest - false + true None Debug; Release @@ -69,6 +69,23 @@ + + + net46;net7.0-windows + + + + + 2017 + + + + + 2025 + + + + true @@ -121,7 +138,7 @@ Copyright © $(CopyrightYears) $(Company) - + diff --git a/Revit.Busy.Example/Revit/App.cs b/Revit.Busy.Example/Revit/App.cs index 97fb6b4..8601aff 100644 --- a/Revit.Busy.Example/Revit/App.cs +++ b/Revit.Busy.Example/Revit/App.cs @@ -1,8 +1,9 @@ +#if NETFRAMEWORK using Autodesk.Revit.DB; using Autodesk.Revit.UI; using ricaun.Revit.UI; +using Revit.Busy; using System; - namespace Revit.Busy.Example.Revit { [AppLoader] @@ -50,4 +51,5 @@ private static void UpdateLargeImageBusy(RibbonItem ribbonItem, RevitBusyService ribbonItem.SetLargeImage(LargeImageNoBusy); } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Revit.Busy/Revit.Busy.csproj b/Revit.Busy/Revit.Busy.csproj index f0dee1d..82c32c8 100644 --- a/Revit.Busy/Revit.Busy.csproj +++ b/Revit.Busy/Revit.Busy.csproj @@ -6,7 +6,7 @@ AnyCPU true latest - false + true None Debug; Release; @@ -14,53 +14,18 @@ + + net46;net7.0-windows + - + 2017 - net46 - - - - - 2018 - net46 - - - - - 2019 - net47 - - - - - 2020 - net47 - - - - - 2021 - net48 - - - - - 2022 - net48 - - - - - 2023 - net48 - 2017 - net46 + 2025 @@ -68,7 +33,7 @@ true - bin\Release\$(RevitVersion) + bin\Release\ REVIT$(RevitVersion) MSB3052 None @@ -91,7 +56,7 @@ Revit.Busy - 0.1.2 + 0.2.0 {3BAB660A-FADA-4AF0-BE2E-23B7FC5067FC} @@ -164,7 +129,15 @@ - + + + + + + + + +