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

WinUI for Desktop #2775

Closed
Fernand-Delavy opened this issue Jun 29, 2020 · 15 comments
Closed

WinUI for Desktop #2775

Fernand-Delavy opened this issue Jun 29, 2020 · 15 comments
Assignees
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-ProjectSystem product-winui3 WinUI 3 issues

Comments

@Fernand-Delavy
Copy link

using Visual Studio 2019 Version 16.7.0 Preview 3.1
Using Windows 10 Pro 2004 19.41.329

I create app WINUI Desktop with out any change and try to run, it crash
I did as mentionned else where remove dotnet-sdk-5.0.100-preview.6.20318.15-win-x64.exe and x86
I isnstall dotnet-sdk-5.0.100-preview.4.20258.7-win-x64.exe and x86

I try to run, it do not crash but exit with code : -1073741189 (0xc000027b)

output windows :

'Fch.exe' (CoreCLR: DefaultDomain): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\Fch.dll'. Symbols loaded.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\winrt.runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\Microsoft.WinUI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Runtime.CompilerServices.Unsafe.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Private.Uri.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Numerics.Vectors.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Linq.Expressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Security.Cryptography.Algorithms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Security.Cryptography.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Security.Cryptography.Csp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\Microsoft.Windows.SDK.NET.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Memory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Reflection.Emit.ILGeneration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Reflection.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Reflection.Emit.Lightweight.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'Anonymously Hosted DynamicMethods Assembly'.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Reflection.Emit.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'Snippets'.
The program '[7380] Fch.exe' has exited with code -1073741189 (0xc000027b).

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 29, 2020
@StephenLPeters StephenLPeters added area-ProjectSystem appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps product-winui3 WinUI 3 issues labels Jun 29, 2020
@StephenLPeters
Copy link
Contributor

@Fernand-Delavy I assume you have seen this documentation on using WinUI Desktop? @MikeHillberg and @stevenbrix FYI

@stevenbrix
Copy link
Contributor

stevenbrix commented Jun 30, 2020

@Fernand-Delavy can you disable the "Just My Code" setting so that we can get a complete callstack?

image

image

@Fernand-Delavy
Copy link
Author

Thanks you,

The app Fch has been bcreated with VS 2019 16.7.0 Preview 3.1 WinUI for Desktop , runing Windows 10 Pro 2004 19041.329
nothing changed or added.

I did convert many app 's for WinUI for UWP this work,

I did disable the option, result : exactly the same !
See info.jpg attached
Info

@stevenbrix
Copy link
Contributor

@Fernand-Delavy sorry for not being more clear, disabling that feature won't fix the problem, it will just allow us to get better callstacks so that we can see what's going on. Can you share the callstack you are receiving?

@Fernand-Delavy
Copy link
Author

Dear Sir,
Sorry i am not so good in english ( i speak french)

i use dotnet-sdk-5.0.100-preview.4.20258.7-win-x64 and X86 (Preview 6 crash on run )

I do not know what you do you mean with callstack ?

empty orginal created by VS 2019 attached
Fch.zip

the only thing happends is the output window mentionned and a App.g.i.cs below 👍
`#pragma checksum "D:\WinUi Desktop\Fch\Fch\Fch\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "61DD20C1E6EAB8825E7F7338194955C5624A7932AAF7CADB6D65208B08DD196F"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------

namespace Fch
{
#if !DISABLE_XAML_GENERATED_MAIN
///


/// Program class
///

public static class Program
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.UI.Xaml.Markup.Compiler"," 0.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.STAThreadAttribute]
static void Main(string[] args)
{
global::WinRT.ComWrappersSupport.InitializeComWrappers();
global::Microsoft.UI.Xaml.Application.Start((p) => {
global::Microsoft.UI.Threading.DispatcherQueueSyncContext.SetForCurrentThread();
new App();
});
}
}
#endif

partial class App : global::Microsoft.UI.Xaml.Application
{
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.UI.Xaml.Markup.Compiler"," 0.0.0.0")]
    private bool _contentLoaded;
    /// <summary>
    /// InitializeComponent()
    /// </summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.UI.Xaml.Markup.Compiler"," 0.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    public void InitializeComponent()
    {
        if (_contentLoaded)
            return;

        _contentLoaded = true;

#if DEBUG && !DISABLE_XAML_GENERATED_BINDING_DEBUG_OUTPUT
DebugSettings.BindingFailed += (sender, args) =>
{
global::System.Diagnostics.Debug.WriteLine(args.Message);
};
#endif
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
};
#endif
}
}
}

`

@stevenbrix
Copy link
Contributor

@Fernand-Delavy, no worries - I'm sorry for not being more clear. The callstack is what you showed in the output window:

output windows :

'Fch.exe' (CoreCLR: DefaultDomain): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\Fch.dll'. Symbols loaded.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\winrt.runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\Microsoft.WinUI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Fch.exe' (CoreCLR: clrhost): Loaded 'D:\WinUi Desktop\Fch\Fch\Fch\bin\x86\Debug\netcoreapp5.0\win-x86\System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

The reason I asked you to disable the "Just My Code" setting is because it says Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. If you disable the setting, you should see the actual method names being called, which provides more context as to what the issue is

Another way to get to the callstack (note that this exception isn't the same one you saw - I can't repro it):
image

It's generally docked in the bottom of your VS alongside the output window:
image

@StephenLPeters StephenLPeters removed the needs-triage Issue needs to be triaged by the area owners label Jun 30, 2020
@CodeBehemoth
Copy link

@Fernand-Delavy : I hope, I have a solution for you.
I have had the same problem: created "Blank App, Packaged ( WinUI in Desktop )", select my project a Startup Project and I have got the same error message.
But, after selection of another, package project as startup project, the application runs without problems.
I'm a newbee in WinUI, so I cannot say why it's so, I'll try to find it out now :)

@stevenbrix
Copy link
Contributor

@CodeBehemoth that is expected at this point, we don't currently support unpackaged desktop apps in preview2

@EricPlayZ
Copy link

Damnit, I'm having the same problem when trying to run a WinUI in Desktop app. Is there nothing I can do? I was hoping I could switch from using FluentWPF with a WPF application, since it's pretty unoptimized and it creates so much lag when creating more than 10 buttons with the reveal effect...

@EricPlayZ
Copy link

EricPlayZ commented Oct 19, 2020

Now I'm trying to build it as x86 and it gives me this: Method not found: 'Void System.Runtime.InteropServices.ComWrappers.RegisterForTrackerSupport(System.Runtime.InteropServices.ComWrappers)'.. I have .NET 5.0-preview 5 SDK installed. I tried preview 6, same thing. I'm also using Visual Studio 2019 16.7.6. Not sure what to do anymore :/

@stevenbrix
Copy link
Contributor

@EricPlayZ do you also have other versions of .NET5 preview installed? You might need to use global.json to make sure the preview5 sdk is actually used.

@EricPlayZ
Copy link

@EricPlayZ do you also have other versions of .NET5 preview installed? You might need to use global.json to make sure the preview5 sdk is actually used.

No, as I've always uninstalled the latest version whenever I tried an older one.

@stevenbrix
Copy link
Contributor

@EricPlayZ
Copy link

@EricPlayZ, can you please share a binlog?

See https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/debugging_buildfailures.md for how to collect binlogs

Sure, I will when I have time!

@marb2000
Copy link
Contributor

Closing this issue given it was based on old versions of WinUI 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-ProjectSystem product-winui3 WinUI 3 issues
Projects
None yet
Development

No branches or pull requests

7 participants