-
Notifications
You must be signed in to change notification settings - Fork 4
Add multi-targeting support for .NET 4.8.1 and .NET 8 #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Introduced support for both .NET Framework 4.8.1 (net481) and .NET 8 (net8.0-windows) across all project files. Conditional logic enables .NET 8 support only when the Security Center 5.12.2+ SDK (GSC_SDK_CORE) is detected. - Added framework-specific build configurations (Debug_NET8, Release_NET8, Debug_NET481, Release_NET481) and output paths. - Included .NET 8-specific dependencies: Microsoft.Windows.Compatibility, System.ServiceModel.Primitives, Microsoft.Bcl.AsyncInterfaces, and WPF framework reference. - Added validation logic to warn if .NET 8 is targeted but the required SDK is missing. - Updated `SampleBase` class for improved cancellation handling and user prompts. - Fixed copyright encoding issues in project metadata. - Added a README for .NET 8 compatibility, detailing framework selection, troubleshooting, and manual override options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements multi-targeting support for both .NET Framework 4.8.1 and .NET 8 across all Platform SDK sample projects. The implementation uses conditional logic to automatically detect and enable .NET 8 support only when the Security Center 5.12.2+ SDK is available, ensuring backward compatibility.
- Adds automatic framework detection based on Security Center SDK version
- Implements framework-specific build configurations and output paths
- Includes comprehensive validation and error messaging for developer guidance
Reviewed Changes
Copilot reviewed 78 out of 79 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| SampleBase.cs | Improved cancellation handling and user prompt logic |
| Multiple .csproj files | Added multi-targeting support with conditional .NET 8 enablement |
| README_NET8_COMPATIBILITY.md | Added comprehensive documentation for .NET 8 compatibility |
| App.config | Removed unused assembly binding redirects |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Samples/Platform SDK/LoginManagerSample/LoginManagerSample.csproj
Outdated
Show resolved
Hide resolved
Added `README.md` files to "Media SDK", "Plugin SDK", "Platform SDK", and "Workspace SDK" projects for better project-specific documentation. Consolidated `README_NET8_COMPATIBILITY.md` into the main `README.md` and expanded it with detailed guidance on .NET 8 compatibility, automatic framework detection, environment variables, and troubleshooting. Enhanced the `README.md` with a "Technical Implementation" section explaining multi-targeting in `.csproj` files, framework-specific dependencies, and build configurations. Updated the solution file (`Genetec.Dap.CodeSamples.sln`) to include the new `README.md` files as solution items.
Removed redundant `<TargetFrameworks>` conditions to streamline framework-specific build logic. Eliminated the `<Configurations>` element to consolidate and simplify the build configuration process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 78 out of 79 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Samples/Platform SDK/LoginManagerSample/LoginManagerSample.csproj
Outdated
Show resolved
Hide resolved
Moved the `<ItemGroup>` element inside the `<PropertyGroup>` block for better organization. Updated the `<Certificates>` item to include all `.cert` files from the `Certificates` directory, ensuring they are processed during the build. Retained the `MakeDir` and `Copy` tasks to copy certificates to the output directory.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 78 out of 79 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
Samples/Platform SDK/LoginManagerSample/LoginManagerSample.csproj:1
- There are duplicate .NET 8 configuration sections in this project file. The second set of PropertyGroup elements (lines 93-116) should be removed as they duplicate the functionality already defined in lines 45-91.
<Project Sdk="Microsoft.NET.Sdk">
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Introduced support for both .NET Framework 4.8.1 (net481) and .NET 8 (net8.0-windows) across all project files. Conditional logic enables .NET 8 support only when the Security Center 5.12.2+ SDK (GSC_SDK_CORE) is detected.
SampleBaseclass for improved cancellation handling and user prompts.