Using Roslyn to build dlls; Dark theme#168
Open
romangolev wants to merge 7 commits intoarchitecture-building-systems:masterfrom
Open
Using Roslyn to build dlls; Dark theme#168romangolev wants to merge 7 commits intoarchitecture-building-systems:masterfrom
romangolev wants to merge 7 commits intoarchitecture-building-systems:masterfrom
Conversation
|
您好,邮件已收到,尽快给您回复。
|
There was a problem hiding this comment.
Pull request overview
This pull request modernizes the RevitPythonShell project by implementing two major features: using Roslyn for DLL compilation and adding a Dark theme for Revit 2024+. The Roslyn implementation replaces the legacy AssemblyBuilder approach to fix the "Deploy RPS Addin" functionality (issue #167), while the Dark theme automatically matches Revit's UI theme preference.
Changes:
- Replaced legacy
System.Reflection.EmitDLL generation with modern Roslyn (Microsoft.CodeAnalysis.CSharp) for the Deploy RpsAddin command - Added comprehensive Dark theme support with automatic detection of Revit's theme preference
- Refactored resource loading to support fallback from embedded resources to external files
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| RevitPythonShell/RevitCommands/DeployRpsAddinCommand.cs | Replaced legacy AssemblyBuilder with Roslyn compilation; resources now saved as separate files |
| RpsRuntime/RpsExternalCommandBase.cs | Added constructor parameter and fallback loading from files when embedded resources unavailable |
| RpsRuntime/RpsExternalApplicationBase.cs | Added fallback resource loading from files |
| RevitPythonShell/Helpers/ThemeManager.cs | New theme manager with Revit theme detection and WPF resource management |
| RevitPythonShell/Views/IronPythonConsole.xaml | Updated UI with custom title bar and theme-aware styling |
| RevitPythonShell/Themes/*.xaml | New Light and Dark theme resource dictionaries |
| PythonConsoleControl/* | Enhanced console control with theme support and improved colorization |
| RpsRuntime/ScriptOutputStream.cs | Improved output buffering using StringBuilder instead of BOM handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Primary 2 main purposes for this PR:
Description
Add reference to Microsoft.CodeAnalysis.CSharp and use it to build dlls. This is a modern way to emit dlls which is preferable and supports .NET8 and other platforms.
A new Dark theme is now used for the interface if users choses the Revit to be in a Dark mode. It recognizes Revit theme automatically and switches theme for RPS as well

Declarations
Check these if you believe they are true
*.resxfilesReviewers
@daren-thomas
FYIs
@daren-thomas tested for 2022