Conversation
aed57b6 to
4ca012e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
- Coverage 79.93% 79.72% -0.22%
==========================================
Files 120 121 +1
Lines 4017 4024 +7
Branches 872 873 +1
==========================================
- Hits 3211 3208 -3
- Misses 618 627 +9
- Partials 188 189 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@natemcmaster this PR now almost builds successfully. The only missing bit is that the strong naming does not properly work for .net framework - hence the tests fail. Since I have no knowledge on strong naming whatsoever, can you please help me fix this? |
|
@claude can you provide PR feedback? |
|
Claude encountered an error —— View job PR Review: Multi-targeting Support
|
natemcmaster
left a comment
There was a problem hiding this comment.
Thanks for taking time to put this together. Seeing all these little quirks coming back into the code reminds me of why I dropped .NET Framework in the first place. But, I'm still willing to move forward on this. We will need to get CI building and passing tests first.
One the potential issues I'm particularly keen to discuss is ongoing maintenance. I'm the only maintainer here, and I don't developer with windows anymore. If we could make compilation work for .NET Framework on all platforms, that would make it much easier to validate changes locally instead of needing to roundtrip through GitHub actions. I left a few comments on places in csproj that we can adjust to make that work.
As for the strong-naming piece...not sure. I don't know why that would have stopped working or how to fix it.
| if: ${{ github.event.inputs.release }} | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| runs-on: windows-latest |
There was a problem hiding this comment.
I would generally prefer to keep linux runners. The windows agents are 5 to 10x slower (from my non-scientific testing). Is there any reason this needs to run on Windows?
There was a problem hiding this comment.
I was not aware of a way to make linux compile .net framework. That's the reason for the change. I may be wrong here though.
src/Hosting.CommandLine/McMaster.Extensions.Hosting.CommandLine.csproj
Outdated
Show resolved
Hide resolved
| <_IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</_IsWindows> | ||
|
|
||
| <TargetFrameworks Condition="$(_IsWindows) == 'true'">net8.0;net472</TargetFrameworks> | ||
| <TargetFrameworks Condition="$(_IsWindows) != 'true'">net8.0</TargetFrameworks> |
There was a problem hiding this comment.
Can we make this unconditional? There should be a way to get compiling working on non-windows platforms. IIRC there was a nuget package for this - https://www.nuget.org/packages/Microsoft.NETFramework.ReferenceAssemblies/
There was a problem hiding this comment.
Changed the main projects to do unconditional compilation. This is harder with the test projects though
src/CommandLineUtils/McMaster.Extensions.CommandLineUtils.csproj
Outdated
Show resolved
Hide resolved
|
Claude finished @natemcmaster's task in 2m 17s —— View job PR Review FeedbackThanks for working on multi-targeting support! I've reviewed the PR and compiled feedback based on the maintainer's comments and code analysis. Here's a comprehensive review: Critical Issues1. Strong Naming Issue (Blocking)The PR description and comments mention that strong naming doesn't work properly for .NET Framework, causing test failures. This needs to be resolved before the PR can be merged. The maintainer also noted they're unsure how to fix this - this is a critical blocker that needs investigation. 2. CI/Build Configuration Issues
Language Version Divergence (
3. Project Configuration ConcernsWindows-Only Compilation (
Wildcard Version (
Code Quality Issues4. Bare Catch Block (
|
Source generators run in the compiler/IDE process and should not be strong-named. This fixes the Windows .NET Framework 4.7.2 test failures where the generator DLL was being signed with the same key as the main library, causing strong name verification errors. Co-authored-by: sensslen <3428860+sensslen@users.noreply.github.com>
…for .net framework
fix: disable strong naming for source generator assembly
use fixed versions of polysharp and remove langversion specification …
|
@natemcmaster I was able to figure out the strong naming issue. Basically Microsoft changed how strong named assemblies are loaded between .nset framework and .net core. Basically the source generator failed to load when it was strong named --> See https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming Or so I thought... :( |
…Framework build issues Co-authored-by: sensslen <3428860+sensslen@users.noreply.github.com>
This reverts commit 090a300.
…work tests Co-authored-by: sensslen <3428860+sensslen@users.noreply.github.com>
…ed assemblies Co-authored-by: sensslen <3428860+sensslen@users.noreply.github.com>
…thub.com/sensslen/CommandLineUtils into copilot/fix-dotnet-framework-build-issue
…d-issue Fix .NET Framework test failures by adding app.config to bypass strong name verification

Add multi-targeting support