Skip to content

Flatten Folder Structure (MAX_PATH) #332

@michael-hawker

Description

@michael-hawker

Describe the bug

We're hitting an issue with MAX_PATH again for some reason, even after having tested prior fixes if the repo is checked out too deep on a machine:

Severity Code Description Project File Line Suppression State Error DEP1000: Cannot copy file "C:\Users\...\source\uwp\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehaviorCustomSample.xaml.cs" to layout "C:\Users\...\source\uwp\Labs-Windows\platforms\CommunityToolkit.Labs.WinAppSdk\bin\x86\Debug\net6.0-windows10.0.19041.0\AppX\SourceAssets/StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehaviorCustomSample.xaml.cs.dat". DirectoryNotFoundException - Could not find a part of the path 'C:\Users\...\source\uwp\Labs-Windows\platforms\CommunityToolkit.Labs.WinAppSdk\bin\x86\Debug\net6.0-windows10.0.19041.0\AppX\SourceAssets/StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehaviorCustomSample.xaml.cs.dat'. [0x80070003] CommunityToolkit.Labs.WinAppSdk 

(Incidentally, this is also related to CommunityToolkit/Tooling-Windows-Submodule#18, #88, #37 and fixing not needing to copy the assets for Uno.)

Looking at our setup, we duplicate the experiment name in a lot of folders:

image

  1. For instance in the samples folder we're already in the ProjectTemplate\samples folder, so we should have our subfolders be:
  • Content
  • Uwp
  • Wasm
  • WinAppSdk

For tests we could do similar:

  • Shared (or maybe Cases?)
  • Uwp
  • WinAppSdk

  1. Alternatively, I like even better just the idea of splitting out the runner projects entirely:
  • project template
    • src
    • samples
      • docs/pages just go directly here now
    • tests
      • test pages/cases go directly here now
    • heads (if only we could auto-generate these all on solution opening...)
      • Uwp
      • Wasm
      • WinAppSdk
      • Tests.Uwp
      • Tests.WinAppSdk

Not only does this remove a whole directory layer from our tree, it also makes it immediately clear where everything goes in an experiment and everything that doesn't need to be touched by a contributor and only needed to run the projects is in a single place.

That also makes it easier for us to migrate experiments when we make future infrastructure changes as we should be able to theoretically just wipe and re-create the heads directory of each experiment and not have to reach into so many directories as we would now.

Steps to reproduce

Clone repo through VS to the standard source folder under users off main... Build, then try and deploy... 

Expected behavior

Should be able to run.

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, but only if others can assist.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions