revit-sdk-project-configuration
/revit-sdk-project-configuration
Konfiguruje plik csproj projektu Revit przez MSBuild Nice3point.Revit.Sdk, w tym wersję frameworka i domyślne ustawienia dodatku.
- Autor
- nice3point ↗
- Repozytorium
- revit-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 08.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 08.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Konfiguruje plik csproj projektu Revit przez MSBuild Nice3point.Revit.Sdk, w tym wersję frameworka i domyślne ustawienia dodatku.
Oryginalny opis (EN)
Configure the Revit project .csproj with the MSBuild Nice3point.Revit.Sdk. USE FOR: setting the project SDK, or configuring the target framework, implicit usings, language version, or add-in defaults. DO NOT USE FOR: adding or removing a supported Revit version (use revit-multi-version-configuration), referencing the Revit API assemblies (use revit-api-references), or publishing the add-in (use revit-addin-publishing).
Jak działa
- When to use
- Workflow
- Validation
- Common Pitfalls
Podgląd SKILL.md
--- name: revit-sdk-project-configuration description: > Configure the Revit project .csproj with the MSBuild Nice3point.Revit.Sdk. USE FOR: setting the project SDK, or configuring the target framework, implicit usings, language version, or add-in defaults. DO NOT USE FOR: adding or removing a supported Revit version (use revit-multi-version-configuration), referencing the Revit API assemblies (use revit-api-references), or publishing the add-in (use revit-addin-publishing). license: MIT --- # Revit SDK Project Configuration The `Nice3point.Revit.Sdk` MSBuild SDK derives Revit-project defaults from the active build configuration. The project file declares no per-configuration settings by hand. ## When to use - Creating or reviewing a Revit project's `.csproj`. - Deciding which properties to set explicitly and which the SDK already provides. ## Workflow ### Step 1: Set the SDK Reference the SDK, pinning the current published version: ```xml <Project Sdk="Nice3point.Revit.Sdk/<version>"> ``` ### Step 2: Let the SDK resolve the Revit version The SDK reads `$(RevitVersion)` from digits in the active configuration name — `Release.R27` and `Debug.R27` both resolve to `2027`, and a four-digit form (`Release.2027`) resolves to `2027` as-is. A configuration with no resolvable version fails the build with a clear error; set `$(RevitVersion)` explicitly only to override the derivation. ### Step 3: Let the SDK derive the framework and build defaults From `$(RevitVersion)` the SDK sets the defaults otherwise hand-written per project and per configuration: - The `TargetFramework` for each Revit version, from the official framework mappings Autodesk provides. - `LangVersion=latest`, `Nullable=enable`, `ImplicitUsings=true`, `ImplicitRevitUsings=true`. - `AppendTargetFrameworkToOutputPath=false` for a flat output path when the add-in works on a single framework version. - Per-configuration `Optimize`, `DebugSymbols`, and `DebugType` (`portable` for `Debug.*`, `none` for `Release.*`), and the `DEBUG`/`RELEASE` constants. - The `REVIT####` and `REVIT####_OR_GREATER` compilation symbols for multi-version branching (see `revit-multi-version-configuration`). ### Step 4: Control implicit Revit usings Based on the referenced assemblies, the SDK adds global usings for `Autodesk.Revit.DB`, `JetBrains.Annotations`, `Nice3point.Revit.Toolkit`, `Nice3point.Revit.Extensions`, and the CommunityToolkit MVVM namespaces; a typical file needs no `using` block. Turn them all off with `<ImplicitRevitUsings>false</ImplicitRevitUsings>`, or drop a single one with `<Using Remove="Autodesk.Revit.DB" />`. ### Step 5: Set the few properties in a root add-in project The SDK does not author the `.addin` manifest — it copies and version-patches the one the project provides (see `revit-addin-publishing`). The .NET SDK then emits the runtime config and copies NuGet dependencies to the output folder, where Revit can load them: ```xml <LaunchRevit>true</LaunchRevit> <DeployAddin>true</DeployAddin> <EnableDynamicLoading>true</EnableDynamicLoading> ``` ### Step 6: Verify Restore and build; confirm the target framework and the emitted `REVIT####` symbols match the active configuration. ## Validation - [ ] The project sets `Sdk="Nice3point.Revit.Sdk/…"`. - [ ] The target framework, language version, and usings come from the SDK and are not declared in the project. - [ ] Implicit usings are adjusted through SDK properties, not a manual using list. ## Common Pitfalls | Pitfall | Correct approach | |--------------------------------------------------------|----------------------------------------------------------------------------------| | Hand-writing `<TargetFramework>` per version | Let the SDK derive it from `RevitVersion`. | | Configuration name with no version number | Add the year (`Release.R27`); the SDK errors when `RevitVersion` cannot resolve. | | Re-declaring `Nullable`/`LangVersion`/`ImplicitUsings` | The SDK already sets them. | | Removing `AppendTargetFrameworkToOutputPath=false` | Retain it. Add-in publishing requires the flat output path. | | SDK not found on restore | Pin an available `Nice3point.Revit.Sdk` version in the `Sdk` attribute. |
Wersje
W bazie nie ma innych skilli o nazwie revit-sdk-project-configuration.
Migawka bazy z 13.11.2026 · wersja paczki 71841246e10d (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 3 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100revit-multi-version-configuration
Obsługuje wiele wersji Revit w jednym projekcie przez konfiguracje Debug.RNN i Release.RNN oraz warunkową kompilację REVIT####. - 98revit-api-references
Dodaje do projektu referencje do zestawów Revit API przez pakiety NuGet Nice3point. - 90revit-ai-test-automation
Prowadzi asystenta AI przez tworzenie i uruchamianie testów wtyczek Revit na Windows, od scenariuszy po regresję w kopii modelu. - 100msbuild-modernization
Modernizuje i migruje pliki projektów MSBuild do formatu SDK-style: konwersja .csproj i .vbproj, packages.config na PackageReference, usuwanie AssemblyInfo.cs i konsolidacja ustawień w Directory.Build.props. - 100msbuild-csproj
Pomaga strukturyzować pliki .csproj MSBuild, Directory.Build.props, Directory.Packages.props i Central Package Management oraz przepływy dotnet CLI przy szkieletach projektów .NET. - 98open-point-cloud
Podpina chmury punktów PLY i E57 do modelu Revit przez dodatek Open Point Cloud, z poziomu agenta lub skryptu.