RedHeadEmile
RedHeadEmile
CC#
Created by RedHeadEmile on 5/9/2024 in #help
How to get Windows.Storage.Provider
Good afternoon, I'm trying to use the namespace Windows.Storage.Provider (https://learn.microsoft.com/en-us/uwp/api/windows.storage.provider?view=winrt-22621) In order to build a Cloud Sync Engine (https://learn.microsoft.com/en-us/windows/win32/cfapi/cloud-files-api-portal) But I don't know how to make it available in my project... I actually can't import the NuGet Package "Microsoft.Windows.SDK.NET.Ref" (https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.10?_src=template) and I don't know why (the error says that the package has a "DotnetPlatform" type that isn't compatible with my project). I also tried to install the NuGet package WinRT but it didn't solve anything :( Here is my current .csproj file:
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.10</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<Platforms>x86;x64;ARM64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CsWinRTComponent>true</CsWinRTComponent>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.17134.1000" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.10</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<Platforms>x86;x64;ARM64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CsWinRTComponent>true</CsWinRTComponent>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.17134.1000" />
</ItemGroup>

</Project>
1 replies