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

Feedback and errors #13

Open
hansmbakker opened this issue Jul 30, 2019 · 1 comment
Open

Feedback and errors #13

hansmbakker opened this issue Jul 30, 2019 · 1 comment

Comments

@hansmbakker
Copy link

hansmbakker commented Jul 30, 2019

I'm trying to build a similar app to the Winforms on netcore3.0 example.

Unfortunately I can't get it to work following the steps in https://github.com/marb2000/XamlIslands/blob/master/1903_Samples/WnForms_and_WPF_Readme.md, even though this seems to be the most exhaustive explanation I can find.

Setup:

  • Visual Studio 16.3 Preview 1
  • .net core 3.0 preview 7

What am I trying:

  • Winforms project written in .net core that sits in Systray
  • UWP class library containing user controls, theme resources and assets
    • user control class library references the Microsoft.Toolkit.Uwp.UI.Animations nuget package

What did I miss from the explanation:

  • Platforms + RuntimeIdentifiers need to be set to x86/x64 (VS also gives a warning about the VCForwarders if you do not do that). VS template for Winforms on netcore3.0 does not set them by default and then VS thinks you want to use AnyCpu.
    <Platforms>x64;x86</Platforms>
    <RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>

If I do not add this, I get a warning:

Because your app is being built as AnyCPU no Microsoft.VCRTForwarders.140 DLLs were copied to your ouput folder. Microsoft.VCRTForwarders.140 only supports x86 or x64 applications due to a C++ Runtime dependency. Please change your app project architecture to x86 or x64 in the Configuration Manager.

After adding this, the app does not start anymore on x86:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.

On x64, the app raises an exception:

System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Toolkit.Uwp.UI.Animations, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null'.

Are the Microsoft.Toolkit.Uwp.UI.Animations supported in xaml islands? Should I include them in a special way?

@hansmbakker
Copy link
Author

hansmbakker commented Jul 31, 2019

x64:

x86:

  • The issue on x86 is not solved by removing Microsoft.Toolkit.Uwp.UI.Animations

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

No branches or pull requests

1 participant