Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ricardobossan
Copy link
Member

@ricardobossan ricardobossan commented Feb 21, 2025

Fixes #

Proposed changes

Customer Impact

Regression?

  • Yes / No

Risk

Screenshots

Before

After

Test methodology

Accessibility testing

Test environment(s)

Microsoft Reviewers: Open in CodeFlow

@ricardobossan ricardobossan self-assigned this Feb 21, 2025
@ricardobossan
Copy link
Member Author

Drafted because:

  • Need to address nullability warnings
  • net481 compiles without errors but doesn't launch

@ricardobossan
Copy link
Member Author

ricardobossan commented Feb 21, 2025

@Tanya-Solyanik @LeafShi1 @Epica3055 I was able to get the DemoConsole project to compile for multiple targets ($(NetCurrent)-windows and net481), but it doesn't launch on net481. There's no error message explaining why. It just fails silently. Do you have any idea what might be causing this?

I’m aware of the nullability warnings that I still need to address, but could they be related to this issue?

@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label Feb 21, 2025
Copy link
Member

@Tanya-Solyanik Tanya-Solyanik left a 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.

<TargetFramework />

<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are referencing project when building Core and you have assembly references when building NETFX, line 32 is not needed.

@@ -37,6 +40,7 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change can be factored out into a separate PR with some other cleanup changes you have

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is necessary to prevent the following build error, which occurs regardless of whether the solution is built from the root or the DemoConsole folder:

"C:\Users\v-rbossan\source\repos\winforms\Winforms.sln" (default target) (1) ->
"C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DemoConsole\DemoConsole.csproj" (default target) (42) ->
"C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DemoConsole\DemoConsole.csproj" (Build target) (42:2) ->
"C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\DesignSurfaceExt.csproj" (default target) (43:4) ->
(CoreCompile target) ->
C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\PropertyGridExt.cs(43,26): error WFO1000: Property 'DesignerHost' does not configur
e the code serialization for its property content [C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\DesignSurfaceExt.csproj::TargetFra
mework=net10.0-windows]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this change is necessary, I suggest getting it in before the rest of the changes in this PR to make this PR more targetted.

@ricardobossan ricardobossan force-pushed the Issue_12830_Multi-Target_DemoConsole branch from e1471f3 to 78c0cbd Compare February 21, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft draft PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants