-
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
Progress in making DemoConsole multi-target #12885
base: main
Are you sure you want to change the base?
Progress in making DemoConsole multi-target #12885
Conversation
....Windows.Forms/tests/IntegrationTests/DesignSurface/DesignSurfaceExt/DesignSurfaceExt.csproj
Outdated
Show resolved
Hide resolved
85b1d5d
to
ec1c3db
Compare
<!-- Do not build this project when doing a .NET product build. --> | ||
<!-- The files for this project have been removed from the .NET product due to licensing issues. --> | ||
<ExcludeFromDotNetBuild>true</ExcludeFromDotNetBuild> | ||
<IsTestUtilityProject>true</IsTestUtilityProject> | ||
<TargetFrameworks>$(NetCurrent)-windows;net481</TargetFrameworks> | ||
<!-- Unset TargetFramework as this property gets set in Directory.Build.props. This is necessary to avoid over-building. --> | ||
<TargetFramework /> |
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 - try putting this line into DesignSurfaceExt.csproj
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 - try putting this line into DesignSurfaceExt.csproj
@Tanya-Solyanik
In the latest commit (c3fe1eeb):
- On root folder:
msbuild /t:Clean WinForms.sln
.\Restore.cmd #works
.\build.cmd #errors:
# DesignSurfaceExt net481 failed with 4 error(s) (3.5s)
# C:\Users\v-rbossan\source\repos\winforms\artifacts\obj\DesignSurfaceExt\Debug\net481\DesignSurfaceExt.AssemblyInfo.cs(13,38): error CS0234: The type or namespace name 'SupportedOSPlatformAttribute' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?)
# C:\Users\v-rbossan\source\repos\winforms\artifacts\obj\DesignSurfaceExt\Debug\net481\DesignSurfaceExt.AssemblyInfo.cs(13,38): error CS0234: The type or namespace name 'SupportedOSPlatform' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?)
# C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\TypeDiscoveryService.cs(6,26): error CS0234: The type or namespace name 'Immutable' does not exist in the namespace 'System.Collections' (are you missing an assembly reference?)
# C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\TypeDiscoveryService.cs(19,49): error CS0246: The type or namespace name 'ImmutableArray<>' could not be found (are you missing a using directive or an assembly reference?)
#
# NativeTests failed with 1 error(s) (4.2s)
# C:\.tools\.nuget\packages\microsoft.dotnet.cmake.sdk\10.0.0-beta.25074.4\build\Microsoft.DotNet.CMake.Sdk.targets(180,5): error MSB3073:
# The command "
# call "C:\Users\v-rbossan\source\repos\winforms\eng\init-vs-env.cmd"
#
# cmake -G "Visual Studio 17 2022" -A Win32 -B "C:\Users\v-rbossan\source\repos\winforms\artifacts\obj\NativeTests\x86\Debug" -S "C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\InteropTests\NativeTests" -DCMAKE_INSTALL_PREFIX=C:\Users\v-rbossan\source\repos\winforms\artifa
# cts\bin\NativeTests\x86\Debug --log-level=WARNING
# " exited with code 1.
# System.Windows.Forms.Interop.Tests failed (1.2s) → artifacts\bin\System.Windows.Forms.Interop.Tests\x86\Debug\net10.0-windows7.0\System.Windows.Forms.Interop.Tests.dll
# DesignSurfaceExt net10.0-windows failed with 1 error(s) (2.0s)
# C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\PropertyGridExt.cs(42,26): error WFO1000: Property 'DesignerHost' does not configure the code serialization for its property content
- on
DemoConsole
project folder:
msbuild /t:Clean DemoConsole.csproj
dotnet restore # works
msbuild # errors:
# C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\PropertyGridExt.cs(42,26): error WFO1000: Property 'DesignerHost' does not configure the code serialization for its property content [C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\DesignSurfaceExt.csproj::TargetFramework=net10.0-windows]
# C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\PropertyGridExt.cs(42,26): error WFO1000: Property 'DesignerHost' does not configure the code serialization for its property content [C:\Users\v-rbossan\source\repos\winforms\src\System.W
#indo
#rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\DesignSurfaceExt.csproj::TargetFramework=net481]
# C:\Users\v-rbossan\source\repos\winforms\artifacts\obj\DesignSurfaceExt\Debug\net481\DesignSurfaceExt.AssemblyInfo.cs(14,38): error CS0234: The type or namespace name 'SupportedOSPlatform' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?) [C:\Users\v-rboss
#an\s
#ource\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\DesignSurfaceExt.csproj::TargetFramework=net481]
# C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\TypeDiscoveryService.cs(6,26): error CS0234: The type or namespace name 'Immutable' does not exist in the namespace 'System.Collections' (are you missing an assembly reference?) [C:\Users
#\v-r
#bossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\DesignSurfaceExt.csproj::TargetFramework=net481]
# C:\Users\v-rbossan\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\TypeDiscoveryService.cs(19,49): error CS0246: The type or namespace name 'ImmutableArray<>' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\v-rb
#ossa
#n\source\repos\winforms\src\System.Windows.Forms\tests\IntegrationTests\DesignSurface\DesignSurfaceExt\DesignSurfaceExt.csproj::TargetFramework=net481]
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.
Progress!
WFO1000 - can be fixed by adding a [SerializationVisibility(...)] attribute to the flagged property, see the info link associated with this message.
You might have to add conditional compilation in source using
#if NETCOREAPP
#else
#endif
or
#if NETFRAMEWORK
#endif
see the designer repo, and conditional reference of different packages in the project files.
System.Collections.Immutable is available on .NET Framework as a package https://learn.microsoft.com/dotnet/api/system.collections.immutable.immutablearray?view=netframework-4.8-pp
Maybe you can provide AssemblyInfo file for the .NET Framework conditionally in the .csproj file to avoid auto generation
ec1c3db
to
d24f80d
Compare
Fixes #12830
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
After
Test methodology
Accessibility testing
Test environment(s)
Microsoft Reviewers: Open in CodeFlow