Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ca1fa6d
ApplicationData.GetForUnpackaged() initial skeleton
DrusTheAxe Nov 29, 2024
609292b
Integrated UnpackagedApplicationData into ApplicationData
DrusTheAxe Nov 29, 2024
16715d3
Added tests. Removed debugging and dead code
DrusTheAxe Nov 30, 2024
269b335
Fixed most tests
DrusTheAxe Nov 30, 2024
77800cc
More tests passing
DrusTheAxe Nov 30, 2024
da81949
Various fixes
DrusTheAxe Nov 30, 2024
2b5fc53
TODO comments to expedite follow up
DrusTheAxe Nov 30, 2024
d3eb6a9
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Mar 5, 2026
30348af
Implement UnpackagedApplicationDataContainer
DrusTheAxe Mar 6, 2026
a85c2d3
Added Unpackaged tests. Tweaked Unpackaged implementation
DrusTheAxe Mar 9, 2026
8ee0787
Fix build errors
DrusTheAxe Mar 9, 2026
905360e
Fix build errors
DrusTheAxe Mar 9, 2026
7ff4abf
Fix build errors
DrusTheAxe Mar 9, 2026
69bd478
Fix test errors
DrusTheAxe Mar 9, 2026
371a657
More test fixes
DrusTheAxe Mar 10, 2026
2f7c5b7
Test fix. DeleteContainer fix
DrusTheAxe Mar 10, 2026
f3412fd
Fixed an inverted check
DrusTheAxe Mar 10, 2026
9ae80b1
Fix tests
DrusTheAxe Mar 10, 2026
ea645f8
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Mar 12, 2026
432f0b3
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Mar 17, 2026
3782993
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Mar 20, 2026
7d3ea9a
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Mar 21, 2026
c29a8ba
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Mar 24, 2026
54620d1
Incorporated feeedback. In progress
DrusTheAxe Mar 26, 2026
9af415d
Fixes
DrusTheAxe Mar 26, 2026
9262de9
Added header
DrusTheAxe Mar 26, 2026
d925d57
Fixed
DrusTheAxe Mar 27, 2026
2d3c380
Incorporated feedback
DrusTheAxe Mar 27, 2026
7bd8e3a
Fixed Container name validation
DrusTheAxe Mar 31, 2026
1567ce0
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Mar 31, 2026
3b7947c
Fixed test bug
DrusTheAxe Apr 1, 2026
8c511b0
Merge branch 'main' into user/drustheaxe/appdata-unpackaged
DrusTheAxe Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion dev/ApplicationData/ApplicationData.idl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ namespace Microsoft.Windows.Storage
static ApplicationData GetForPackageFamily(String packageFamilyName);

/// Get an instance of ApplicationData for the specified unpackaged app for the current user.
[feature(Feature_ApplicationData)]
/// @note This method respects impersonation.
/// @warning The returned instance of ApplicationData does not support LocalCache, PublisherCache or SharedLocal features.
[contract(ApplicationDataContract, 2)]
static ApplicationData GetForUnpackaged(String publisher, String product);

Expand All @@ -95,6 +96,7 @@ namespace Microsoft.Windows.Storage

/// Return the path for the local cache data store not included in backup and restore operations.
/// @note This is equivalent to Windows.Storage.ApplicationData.LocalCacheFolder().Path()
/// @warning This method is not supported if the ApplicationData instance was acquired via GetForUnpackaged().
/// @see https://learn.microsoft.com/uwp/api/windows.storage.applicationdata.localcachefolder
String LocalCachePath { get; };

Expand All @@ -111,6 +113,7 @@ namespace Microsoft.Windows.Storage

/// Return the path for the shared data store.
/// @note This is equivalent to Windows.Storage.ApplicationData.SharedLocalFolder().Path()
/// @warning This method is not supported if the ApplicationData instance was acquired via GetForUnpackaged().
/// @see https://learn.microsoft.com/uwp/api/windows.storage.applicationdata.sharedlocalfolder
String SharedLocalPath { get; };

Expand All @@ -120,6 +123,7 @@ namespace Microsoft.Windows.Storage
String TemporaryPath { get; };

/// Return a StorageFolder for the local cache data store not included in backup and restore operations.
/// @warning This method is not supported if the ApplicationData instance was acquired via GetForUnpackaged().
/// @see https://learn.microsoft.com/uwp/api/windows.storage.applicationdata.localcachefolder
Windows.Storage.StorageFolder LocalCacheFolder { get; };

Expand All @@ -134,6 +138,7 @@ namespace Microsoft.Windows.Storage
Windows.Storage.StorageFolder MachineFolder { get; };

/// Return a StorageFolder for the shared data store.
/// @warning This method is not supported if the ApplicationData instance was acquired via GetForUnpackaged().
/// @see https://learn.microsoft.com/uwp/api/windows.storage.applicationdata.sharedlocalfolder
Windows.Storage.StorageFolder SharedLocalFolder { get; };

Expand All @@ -157,10 +162,12 @@ namespace Microsoft.Windows.Storage

/// Return the specified path of the shared data store for the publisher of the app.
/// @note This is equivalent to Windows.Storage.ApplicationData.GetPublisherCacheFolder(folderName).Path()
/// @warning This method is not supported if the ApplicationData instance was acquired via GetForUnpackaged().
/// @see https://learn.microsoft.com/uwp/api/windows.storage.applicationdata.getpublishercachefolder
String GetPublisherCachePath(String folderName);

/// Return the specified subfolder of the shared data store for the publisher of the app.
/// @warning This method is not supported if the ApplicationData instance was acquired via GetForUnpackaged().
/// @see https://learn.microsoft.com/uwp/api/windows.storage.applicationdata.getpublishercachefolder
Windows.Storage.StorageFolder GetPublisherCacheFolder(String folderName);
}
Expand Down
7 changes: 6 additions & 1 deletion dev/ApplicationData/ApplicationData.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);$(RepoRoot)\dev\common</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
Expand All @@ -16,12 +16,17 @@
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.S.ApplicationData.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.S.ApplicationDataContainer.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)UnpackagedApplicationData.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)UnpackagedApplicationDataContainer.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.S.ApplicationData.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.S.ApplicationDataContainer.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.S.ApplicationDataTelemetry.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)pch.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)UnpackagedApplicationData.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)UnpackagedApplicationDataContainer.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)Validate.h" />
</ItemGroup>
<ItemGroup>
<Midl Include="$(MSBuildThisFileDirectory)ApplicationData.idl" />
Expand Down
15 changes: 15 additions & 0 deletions dev/ApplicationData/ApplicationData.vcxitems.filters
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.S.ApplicationDataContainer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)UnpackagedApplicationData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)UnpackagedApplicationDataContainer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.S.ApplicationData.h">
Expand All @@ -31,6 +37,15 @@
<ClInclude Include="$(MSBuildThisFileDirectory)pch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)UnpackagedApplicationData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)UnpackagedApplicationDataContainer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)Validate.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Midl Include="$(MSBuildThisFileDirectory)ApplicationData.idl" />
Expand Down
14 changes: 13 additions & 1 deletion dev/ApplicationData/ApplicationDataTelemetry.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT license.

#pragma once
Expand Down Expand Up @@ -26,4 +26,16 @@ class ApplicationDataTelemetry : public wil::TraceLoggingProvider
}
CATCH_LOG()
END_ACTIVITY_CLASS();
BEGIN_COMPLIANT_MEASURES_ACTIVITY_CLASS(UnpackagedClearAsync, PDT_ProductAndServicePerformance);
DEFINE_ACTIVITY_START(winrt::Microsoft::Windows::Storage::ApplicationDataLocality locality, winrt::hstring const& publisher, winrt::hstring const& product) noexcept try
{
TraceLoggingClassWriteStart(
UnpackagedClearAsync,
_GENERIC_PARTB_FIELDS_ENABLED,
TraceLoggingInt32(static_cast<std::int32_t>(locality), "Locality"),
TraceLoggingWideString(publisher.c_str(), "Publisher"),
TraceLoggingWideString(product.c_str(), "Product"));
}
CATCH_LOG()
END_ACTIVITY_CLASS();
};
Loading
Loading