Skip to content

Conversation

@Padanian
Copy link

@Padanian Padanian commented Jul 3, 2020

No description provided.

</ItemGroup>
<ItemGroup>
<Reference Include="PresentationCore">
<HintPath>..\..\..\..\..\..\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\5.0.0-preview.6.20308.1\ref\net5.0\PresentationCore.dll</HintPath>

Choose a reason for hiding this comment

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

These HintPaths should be replaced by a <UseWindowsForms>true</UseWindowsForms>

Copy link
Author

Choose a reason for hiding this comment

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

Unable to figure out how. Keyword seems unrecognised.
I updated the hintpaths though

<Compile Include="Properties\AssemblyInfo.cs" />
<ProjectReference Include="..\MetroFramework\MetroFramework.csproj" />
</ItemGroup>
<ItemGroup>

Choose a reason for hiding this comment

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

Delete this entire ItemGroup

<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFramework>net5.0</TargetFramework>

Choose a reason for hiding this comment

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

Change this to net5.0-windows and add <UseWindowsForms>true</UseWindowsForms> here

@GunArm
Copy link

GunArm commented Apr 28, 2021

In MetroMessageBox.cs an exception is thrown when clicking OK on a message box. The exception is
System.PlatformNotSupportedException: 'Operation is not supported on this platform.'
on the line:
IAsyncResult _asyncresult = _delegate.BeginInvoke(_control, null, _delegate);
because of this issue
Which can be fixed (to my observation) by replacing it with
Task _asyncresult = Task.Run(() => _delegate(_control));

(Edit: Noticed on core3.1 but I assume it affects 5 as well)

@logicallysynced
Copy link

Just a note that when I build this PR, I cannot add any of the controls to the toolbox anymore. Visual Studio just will not accept the dll to add.

@jespersh
Copy link

@roxaskeyheart the thing we're all waiting for is to https://github.com/dotnet/winforms-designer/ to become public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants