Skip to content

Conversation

@iceljc
Copy link
Collaborator

@iceljc iceljc commented Jan 2, 2026

PR Type

Enhancement


Description

  • Replace hardcoded target framework with global variable

  • Add global properties for language version and package settings

  • Centralize build configuration across plugin projects


Diagram Walkthrough

flowchart LR
  A["Hardcoded Framework<br/>net8.0"] -->|Replace| B["Global Variable<br/>$(TargetFramework)"]
  C["Local Build Settings"] -->|Centralize| D["Global Variables<br/>LangVersion, VersionPrefix,<br/>GeneratePackageOnBuild,<br/>OutputPath"]
  B --> E["Plugin Projects<br/>CodeDriver<br/>JavaScriptInterpreter"]
  D --> E
Loading

File Walkthrough

Relevant files
Configuration changes
BotSharp.Plugin.CodeDriver.csproj
Use global framework and build variables                                 

src/Plugins/BotSharp.Plugin.CodeDriver/BotSharp.Plugin.CodeDriver.csproj

  • Changed TargetFramework from hardcoded net8.0 to $(TargetFramework)
    variable
  • Added LangVersion, VersionPrefix, GeneratePackageOnBuild, and
    OutputPath properties using global variables
  • Enables centralized framework and build configuration management
+6/-2     
BotSharp.Plugin.JavaScriptInterpreter.csproj
Use global framework and build variables                                 

src/Plugins/BotSharp.Plugin.JavaScriptInterpreter/BotSharp.Plugin.JavaScriptInterpreter.csproj

  • Changed TargetFramework from hardcoded net8.0 to $(TargetFramework)
    variable
  • Added LangVersion, VersionPrefix, GeneratePackageOnBuild, and
    OutputPath properties using global variables
  • Aligns plugin configuration with centralized build settings
+6/-2     

@iceljc iceljc merged commit c5160d0 into SciSharp:master Jan 2, 2026
0 of 4 checks passed
@qodo-code-review
Copy link

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Include the global properties definition file

The PR uses global MSBuild properties like $(TargetFramework) without including
the file that defines them, such as Directory.Build.props. This definition file
must be added to the PR to ensure the projects can be built successfully.

Examples:

src/Plugins/BotSharp.Plugin.CodeDriver/BotSharp.Plugin.CodeDriver.csproj [4-10]
    <TargetFramework>$(TargetFramework)</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <LangVersion>$(LangVersion)</LangVersion>
    <VersionPrefix>$(BotSharpVersion)</VersionPrefix>
    <GeneratePackageOnBuild>$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
    <OutputPath>$(SolutionDir)packages</OutputPath>
src/Plugins/BotSharp.Plugin.JavaScriptInterpreter/BotSharp.Plugin.JavaScriptInterpreter.csproj [4-10]
    <TargetFramework>$(TargetFramework)</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <LangVersion>$(LangVersion)</LangVersion>
    <VersionPrefix>$(BotSharpVersion)</VersionPrefix>
    <GeneratePackageOnBuild>$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
    <OutputPath>$(SolutionDir)packages</OutputPath>

Solution Walkthrough:

Before:

// In BotSharp.Plugin.CodeDriver.csproj
<PropertyGroup>
  <TargetFramework>$(TargetFramework)</TargetFramework>
  <LangVersion>$(LangVersion)</LangVersion>
  <VersionPrefix>$(BotSharpVersion)</VersionPrefix>
  <GeneratePackageOnBuild>$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
  <OutputPath>$(SolutionDir)packages</OutputPath>
</PropertyGroup>

// Directory.Build.props file is missing from the PR.

After:

// In BotSharp.Plugin.CodeDriver.csproj (no change needed)
<PropertyGroup>
  <TargetFramework>$(TargetFramework)</TargetFramework>
  ...
</PropertyGroup>

// Add a new file, e.g., Directory.Build.props
<Project>
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <LangVersion>latest</LangVersion>
    <BotSharpVersion>1.0.0</BotSharpVersion>
    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
  </PropertyGroup>
</Project>
Suggestion importance[1-10]: 10

__

Why: This suggestion correctly identifies a critical omission; without the file defining the global MSBuild properties (e.g., Directory.Build.props), the project builds will fail, rendering the PR non-functional.

High
General
Use PackageOutputPath for NuGet packages

Replace with to specify the NuGet package output directory. This avoids
redirecting all build outputs to a shared directory, which can cause build
conflicts.

src/Plugins/BotSharp.Plugin.CodeDriver/BotSharp.Plugin.CodeDriver.csproj [10]

-<OutputPath>$(SolutionDir)packages</OutputPath>
+<PackageOutputPath>$(SolutionDir)packages</PackageOutputPath>
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies that using <OutputPath> can cause build conflicts and correctly proposes using <PackageOutputPath> to prevent these issues, which is a significant improvement for build process stability.

Medium
Condition packaging on Release

Add a condition to the property to ensure NuGet packages are only created
during 'Release' builds, not 'Debug' builds.

src/Plugins/BotSharp.Plugin.CodeDriver/BotSharp.Plugin.CodeDriver.csproj [9]

-<GeneratePackageOnBuild>$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
+<GeneratePackageOnBuild Condition="'$(Configuration)'=='Release'">$(GeneratePackageOnBuild)</GeneratePackageOnBuild>
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: This is a good practice suggestion that improves the development workflow by preventing unnecessary package generation during debug builds, thus speeding up the local build process.

Low
Guard LangVersion override

Add a condition to the property to ensure it is only set if the $(LangVersion)
variable is not empty.

src/Plugins/BotSharp.Plugin.CodeDriver/BotSharp.Plugin.CodeDriver.csproj [7]

-<LangVersion>$(LangVersion)</LangVersion>
+<LangVersion Condition="'$(LangVersion)'!=''">$(LangVersion)</LangVersion>
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: This suggestion improves the robustness of the build configuration by preventing an empty LangVersion property from being set, which could cause build errors.

Low
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant