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

Cannot compile and run Xaml-Controls-Gallery #649

Closed
1 of 3 tasks
sketch34 opened this issue Mar 3, 2021 · 8 comments
Closed
1 of 3 tasks

Cannot compile and run Xaml-Controls-Gallery #649

sketch34 opened this issue Mar 3, 2021 · 8 comments

Comments

@sketch34
Copy link

sketch34 commented Mar 3, 2021

Is this a totally new sample, an addition to an existing sample page, or a modification of an existing sample page?

  • New sample
  • Addition to existing sample
  • Modification to existing sample

If this is an addition/modification to an existing sample page, which one?
How to correctly compile / run the Xaml-Controls-Gallery solution.

Describe the sample
Compile and run the Xaml-Controls-Gallery solution on Windows 10 with a clean install of latest Visual Studio Community 2019 Preview 16.10.0 Preview 1 and required dependencies following the instructions here: https://docs.microsoft.com/en-au/windows/apps/winui/winui3/

I'm on winui3preview branch.

Is your sample request related to a problem? Please describe it
I'm having problems compiling and running the solution. I would love a from-scratch / clean install tutorial showing step by step how to get this sample project compiling and running. Currently blocked on this.

  1. Had to bump the Microsoft.Net.Compilers.Toolset package up to 3.9.0 because "3.8.X.final" was failing the test ">= 3.8.0-4.20472.6". I'm guessing because ".final" is not numeric and ruins the internal version comparison. Couldn't see any other way around this.

image

  1. "NuGet package restore failed. Please see Error List window for detailed warnings and errors." - I have NuGet.org package source configured. No additional info is in the Error List window.
  2. Which configuration is correct for Win 10 desktop?

image

  1. Compilation succeeds but deployment fails for x64, x86, Win32. It is correct that it is trying to copy to an ARM64 output folder when I have not chosen the ARM build configuration? Indeed that output older does not exist.
Copying file "C:\Users\jarro\.nuget\packages\microsoft.winui\3.0.0-preview4.210210.4\runtimes\win10-arm64\native\Microsoft.UI.Xaml\Assets\NoiseAsset_256x256_PNG.png" to layout "XamlControlsGallery.Desktop\runtimes\win10-arm64\native\Microsoft.UI.Xaml\Assets\NoiseAsset_256x256_PNG.png"...
DEP1000: Cannot copy file "C:\Users\jarro\.nuget\packages\microsoft.winui\3.0.0-preview4.210210.4\runtimes\win10-arm64\native\Microsoft.UI.Xaml\Assets\NoiseAsset_256x256_PNG.png" to layout "C:\Dev\ABL_180_ThinkAlpha\WinUI3\Xaml-Controls-Gallery\XamlControlsGallery\bin\XamlControlsGallery.Desktop.Package\XamlControlsGallery.Desktop.Package\AppX\XamlControlsGallery.Desktop\runtimes\win10-arm64\native\Microsoft.UI.Xaml\Assets\NoiseAsset_256x256_PNG.png". DirectoryNotFoundException - Could not find a part of the path 'C:\Dev\ABL_180_ThinkAlpha\WinUI3\Xaml-Controls-Gallery\XamlControlsGallery\bin\XamlControlsGallery.Desktop.Package\XamlControlsGallery.Desktop.Package\AppX\XamlControlsGallery.Desktop\runtimes\win10-arm64\native\Microsoft.UI.Xaml\Assets\NoiseAsset_256x256_PNG.png'. [0x80070003]
	DeploymentSucceeded = False
	DeploymentError = Err_LayoutUpdate_CopyFile
	DeploymentHRESULT = 2147942403
	HasSharedCode = False
	Target.Id = 512
	ProjectGuid = {4c7b20d7-5f5c-440e-8da3-b19a328cc8bd}
	Project.TargetPlatformVersion = 10.0.18362.0
	Project.TargetPlatformMinVersion = 10.0.17134.0
Deleting file "vs.appxrecipe" from layout...
DeployAsync: END (Failure, 0:00:00.64)
Deploy: END (Failure, 0:00:00.659)

Additional context
I'm very experienced with VS C++, but more limited .NET experience, although I have used Nuget and .NET professionally. Experienced in Qt dev, interested in evalutating WinUI 3 as an alternative for a large windows desktop project. Given the somewhat complex and varied Windows UI historical tech stack (.NET, XAML, Win32, WinRT, UWP) it would be awesome if it was clarified exactly what this repo is and how to compile and run it, which config to use and when etc. Looks very cool, thanks for any help!

@stmoy
Copy link
Contributor

stmoy commented Mar 9, 2021

@anawishnoff @MikeHillberg - thoughts?

@rbaprado
Copy link

rbaprado commented Apr 6, 2021

I just checked out the Winui3 branch. When I try to run it I get a REGDB_E_CLASSNOTREG exception

@merojoscimage
Copy link

same issues here: copy failures, nuget update failures, COM exception. Previously, I had successfully developed and deployed a UWP application ( not for the store, enterprise internal ) , so I've done UWP deployments before.

@amitpal1979
Copy link

I am trying to build WinUI3 XAML Controls Gallery code in VS2019 and facing compile time issue. Initially, several errors were thrown however updating VS2019 to the latest build resolved all of them except one:

Could not copy the file "C:\Users\Amit.Pal.nuget\packages\microsoft.web.webview2\1.0.955-prerelease\build..\runtimes\win-ARM\native_uap\Microsoft.Web.WebView2.Core.dll" because it was not found.

The path mentioned in the error message does contain WebView2.Core.dll however I could not understand the reason behind compiler throwing this error message.

@michael-hawker
Copy link
Contributor

@chingucoding @gregwoo-microsoft this still seems to be an issue? I just cloned the repo and Marcel's PR for breadcrumbs #1015 to try out and couldn't deploy that app.

image

Creating a new clean layout...
Copying files: Total 78 mb to layout...
Checking whether required frameworks are installed...
Framework: Microsoft.VCLibs.140.00.Debug.UWPDesktop/X64, app package version 14.0.30704.0 is not currently installed.
Installing missing frameworks...
Registering the application to run from layout...
DEP0700: Registration of the app failed. [0x80073CF9] Rejecting a request to register from AppxBundleManifest.xml because the manifest is not in the package root.
3>Deployment of the application to the target device failed
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I'm on VS 2022 17.2.4, and have other WinUI 3 based projects building/running fine.

I'm assuming I have to run the package project, if I run the other project I get this instead:

image

(I'd also suggest having a different package identity in the repo compared to the store version so you can run both side-by-side, we do this in the toolkit and it's very handy when checking changes in behaviors for samples.)

@marcelwgn
Copy link
Collaborator

@michael-hawker Can you try out if you can build the PR #989 and see if that works? This might be an issue of trying to deploy the app while an app with the same name is installed.

@michael-hawker
Copy link
Contributor

@chingucoding, it did prompt me that the app was already installed and if I wanted to overwrite it (or whatever that default dialog is). I clicked 'Yes' as I do with other projects, and then it failed. I'm headed off at the moment, but can try #989 as well later.

@michael-hawker
Copy link
Contributor

michael-hawker commented Jun 21, 2022

@chingucoding, whatever is done in #989 seemed to have helped. I was able to run it from that branch, have a comment to add there though. :)

I'll wait for #989 to be merged and then can circle back on reviewing #1015.

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

8 participants