The Wayback Machine - https://web.archive.org/web/20220216055530/https://github.com/microsoft/WindowsAppSDK/issues/1528
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

Unable to copy file issues in WinUI Desktop app #1528

Open
KanniyappanP opened this issue Oct 4, 2021 · 1 comment
Open

Unable to copy file issues in WinUI Desktop app #1528

KanniyappanP opened this issue Oct 4, 2021 · 1 comment

Comments

@KanniyappanP
Copy link

@KanniyappanP KanniyappanP commented Oct 4, 2021

Describe the bug

We have a WinUI Desktop application with a class library, but when we try to build it, we get the error "Unable to copy class library files (used .xaml or.txt files) files when compiling WinUI Desktop project." It occurs as a result of accessing files with long file paths and running projects in long directories. The reported issue does not occur if I move the project location closer to the root directory. Can you please confirm whether this is a bug or expected behavior in WinUI? If this is a bug, any suggestions for a workaround would be greatly appreciated.

Please find the issue details below.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(805,5): error MSB3021: Unable to copy file "C:\Users\Public\Documents\Kanniyappan\WinUI\19.3.0.43\SampleBrowser\WinUIClassLibrary\obj\Debug\net5.0-windows10.0.19041.0\Views\Getting started\GettingStarted.xaml" to "C:\Users\Public\Documents\Kanniyappan\WinUI\19.3.0.43\SampleBrowser\WinUIDesktopAppTest\WinUIDesktopAppTest\WinUIDesktopAppTest (Package)\bin\x86\Debug\Microsoft.SampleBrowser.WinUI_Net50\Microsoft.ClassLibrary.WinUIDemos_Net50\Views\Getting started\GettingStarted.xaml". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. 3>Done building project "Microsoft.SampleBrowser.WinUI_Net50 (Package).wapproj" -- FAILED.

Steps to reproduce the bug

  1. Build the attached sample.
  2. Note unable to copy issues occurred.
    3.SampleBrowser.zip

Expected behavior
Please confirm whether the copying problems in WinUI are a bug or a limitations/expected of WinUI.

Screenshots
Errors details are shared as code snippet.

Version Info

NuGet package version:
[Microsoft.WindowsAppSDK 0.8.1]

OS Version: Windows 10 20H2 (19042.1237)

Windows version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)

Additional context

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