-
Notifications
You must be signed in to change notification settings - Fork 1k
Issue 12830 multi target demo console #12996
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
Issue 12830 multi target demo console #12996
Conversation
Drafted because:
|
@Tanya-Solyanik @LeafShi1 @Epica3055 I was able to get the I’m aware of the nullability warnings that I still need to address, but could they be related to this issue? |
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.
Enable all CLR exceptions before starting to debug this project as 4.8.1. I guess immutable collection reference is not discovered.
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
...ystem.Windows.Forms/tests/IntegrationTests/DesignSurface/DesignSurfaceExt/PropertyGridExt.cs
Outdated
Show resolved
Hide resolved
e1471f3
to
78c0cbd
Compare
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
@ricardobossan - the reason the NET481 version does not run is that the dll is not strong-name signed, we should delay-sign it. Arcade should have tools for that. Maybe like this |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12996 +/- ##
===================================================
+ Coverage 62.19645% 62.58708% +0.39063%
===================================================
Files 1556 1560 +4
Lines 159366 159763 +397
Branches 14854 14915 +61
===================================================
+ Hits 99120 99991 +871
+ Misses 59495 58996 -499
- Partials 751 776 +25
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
@LeafShi1 I was able to run the project and navigate through the tabs on Here’s how I set up and ran the project: # From the runtime repo root folder:
gh pr checkout 12996
msbuild /t:Clean .\Winforms.sln
.\Restore.cmd
.\build.cmd
.\start-vs.cmd Could you share the exact steps you're using to run the project? That might help pinpoint any differences that could explain the discrepancy in our results. |
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
...indows.Forms/tests/IntegrationTests/DesignSurface/DesignSurfaceExt/NameCreationServiceImp.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj
Outdated
Show resolved
Hide resolved
....Windows.Forms/tests/IntegrationTests/DesignSurface/DesignSurfaceExt/DesignSurfaceExt.csproj
Outdated
Show resolved
Hide resolved
…e everything visible in the surface designer. Related dotnet#12996 - Resizes `DemoConsole` project's `MainForm` for convenience and to make everything visible in the surface designer. - None - No - Minimal - Manual - 10.0.100-preview.3.25125.5
0f2bd56
to
1c60128
Compare
1c60128
to
8794666
Compare
Fixes dotnet#12830 - Updated `DemoConsole.csproj` and `DesignSurfaceExt.csproj` to support multiple target frameworks (`$(NetCurrent)-windows;net481`). - Adjusted `TargetFramework` property to avoid over-building. - Enabled `SignAssembly` and `GenerateAssemblyInfo` properties in the project files. - Updated resource and reference handling in `DemoConsole.csproj` and `DesignSurfaceExt.csproj` to improve compatibility. - Fixed `Controls.AddRange` usage to use the correct syntax in `MainForm.MyUserControl.cs`. - Corrected `Controls.AddRange` call in `MainForm.cs` to `Controls.Add`. - Suppressed `IDE0057` warning and reverted to `Substring` method for compatibility in `NameCreationServiceImp.cs`. - Changed `StartsWith('_')` check by directly accessing the first character in `NameCreationServiceImp.cs` for compatibility. - Disabled error `CA1824` for projects `DemoConsole` and `DesignSurficeExt`, because it would be triggered even though properly configured in those projects, according to the fix provided by the [documentation](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1824#fix-violations). - None - No - Minimal - `DemoConsole` would not run on `net481`. - Manual - 10.0.100-preview.3.25125.5
8794666
to
735ca00
Compare
@ricardobossan - if System.Runtime.CompilerServices.Unsafe is not available, it's ok to keep targeting 481. I'm curious, what version of compiler services is 481 using? |
…, while also showing it in VS's Solution Explorer
Looks like it's pulling in version From <SystemRuntimeCompilerServicesUnsafePackageVersion>6.1.0-preview.1.24511.1</SystemRuntimeCompilerServicesUnsafePackageVersion> And confirmed in "System.Runtime.CompilerServices.Unsafe": "6.1.0-preview.1.24511.1" |
build failure is a dupe of #13291 |
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.
LGTM with a few comment
src/test/integration/DesignSurface/DesignSurfaceExt/NameCreationServiceImp.cs
Outdated
Show resolved
Hide resolved
…ext PR 2. set main form name so that it reflects the target framework. 3. show readme.md in the solution explorer. 4. removed a default constructor, it will be generated for us. 5. it's ok to have lines almost 120 chars long
@LeafShi1 @ricardobossan - I had experimented with the solution explorer view a little and pushed by feedback into this branch as a commit, please review it and if it looks ok, merge this PR. Test team can test it after it's merged. |
@@ -19,21 +19,13 @@ | |||
avoid over-building. --> | |||
<TargetFramework /> | |||
|
|||
<DefaultItemExcludes Condition="'$(TargetFramework)' != 'net481'"> | |||
$(DefaultItemExcludes);**/Framework/*</DefaultItemExcludes> |
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.
@ricardobossan - please move these exclusions to the next PR
Fixes #12830
Proposed changes
DemoConsole.csproj
andDesignSurfaceExt.csproj
to support multiple target frameworks ($(NetCurrent)-windows;net481
).TargetFramework
property to avoid over-building.SignAssembly
andGenerateAssemblyInfo
properties in the project files.DemoConsole.csproj
andDesignSurfaceExt.csproj
to improve compatibility.Controls.AddRange
usage to use the correct syntax inMainForm.MyUserControl.cs
.Controls.AddRange
call inMainForm.cs
toControls.Add
.IDE0057
warning and reverted toSubstring
method for compatibility inNameCreationServiceImp.cs
.StartsWith('_')
check by directly accessing the first character inNameCreationServiceImp.cs
for compatibility.CA1824
for projectsDemoConsole
andDesignSurficeExt
, because it would be triggered even though properly configured in those projects, according to the fix provided by the documentation.Customer Impact
Regression?
Risk
Screenshots
Before
DemoConsole
would not run onnet481
.After
Test methodology
Test environment(s)