-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: main
Are you sure you want to change the base?
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 61.03240% 61.28720% +0.25479%
===================================================
Files 1539 1541 +2
Lines 158039 158281 +242
Branches 14721 14743 +22
===================================================
+ Hits 96455 97006 +551
+ Misses 60889 60577 -312
- Partials 695 698 +3
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
…e everything visible in the surface designer (#13050) Resizes `DemoConsole` project's `MainForm` for convenience and to make everything visible in the surface designer. Related #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 Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <v-rbossan@microsoft.com>
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.
When setting up Multi target in a project, we need to make sure it compiles and runs properly in a separate TargetFramework.
@Tanya-Solyanik Is that right?
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.
The PR need to rebase main because the tests under src/System.Windows.Forms/tests/IntegrationTests/DesignSurface have been moved to path src\test\integration\DesignSurface. |
…e everything visible in the surface designer (dotnet#13050) Resizes `DemoConsole` project's `MainForm` for convenience and to make 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 Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <v-rbossan@microsoft.com>
c6f9052
to
0193c58
Compare
… multiple target frameworks (`$(NetCurrent)-windows;net481`). 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
0193c58
to
9db5536
Compare
@LeafShi1 @Epica3055 Thanks for your comments! I investigated both issues in detail, and here are my findings: On Leaf's Comment:
On Epica's Comment:
The Furthermore, in I'll look into these issues further after I'm back from my time OOP due to vacation. |
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)