Update nuget icon (#146)
* Updated targets and props files to include nuget package icon * Fixed GraphPresenter after props and targets update * Updated Graph version in UnitTests app * Fixed issue with xaml type reflection * Commented out TreatWarningAsErrors
This commit is contained in:
Родитель
ad7efbd785
Коммит
2c5871072e
|
@ -1,4 +1,5 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CommunityToolkit.Authentication\CommunityToolkit.Authentication.csproj" />
|
||||
<ProjectReference Include="..\CommunityToolkit.Graph\CommunityToolkit.Graph.csproj" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Microsoft.Graph" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Input" Version="7.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="Microsoft.Graph" Version="4.0.0" />
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Input" Version="7.0.2" />
|
||||
<ProjectReference Include="..\CommunityToolkit.Authentication\CommunityToolkit.Authentication.csproj" />
|
||||
<ProjectReference Include="..\CommunityToolkit.Graph\CommunityToolkit.Graph.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -50,4 +50,5 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using Microsoft.Graph;
|
||||
using Microsoft.Toolkit.Uwp;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
@ -20,14 +20,6 @@ namespace CommunityToolkit.Graph.Uwp.Controls
|
|||
/// </summary>
|
||||
public class GraphPresenter : ContentPresenter
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a <see cref="IBaseRequestBuilder"/> to be used to make a request to the graph. The results will be automatically populated to the <see cref="ContentPresenter.Content"/> property. Use a <see cref="ContentPresenter.ContentTemplate"/> to change the presentation of the data.
|
||||
/// </summary>
|
||||
public IBaseRequestBuilder RequestBuilder
|
||||
{
|
||||
get { return (IBaseRequestBuilder)GetValue(RequestBuilderProperty); }
|
||||
set { SetValue(RequestBuilderProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Identifies the <see cref="RequestBuilder"/> dependency property.
|
||||
|
@ -38,6 +30,23 @@ namespace CommunityToolkit.Graph.Uwp.Controls
|
|||
public static readonly DependencyProperty RequestBuilderProperty =
|
||||
DependencyProperty.Register(nameof(RequestBuilder), typeof(IBaseRequestBuilder), typeof(GraphPresenter), new PropertyMetadata(null));
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GraphPresenter"/> class.
|
||||
/// </summary>
|
||||
public GraphPresenter()
|
||||
{
|
||||
this.Loaded += this.GraphPresenter_Loaded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a <see cref="IBaseRequestBuilder"/> to be used to make a request to the graph. The results will be automatically populated to the <see cref="ContentPresenter.Content"/> property. Use a <see cref="ContentPresenter.ContentTemplate"/> to change the presentation of the data.
|
||||
/// </summary>
|
||||
public IBaseRequestBuilder RequestBuilder
|
||||
{
|
||||
get { return (IBaseRequestBuilder)this.GetValue(RequestBuilderProperty); }
|
||||
set { this.SetValue(RequestBuilderProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="Type"/> of item returned by the <see cref="RequestBuilder"/>.
|
||||
/// Set to the base item type and use the <see cref="IsCollection"/> property to indicate if a collection is expected back.
|
||||
|
@ -59,52 +68,47 @@ namespace CommunityToolkit.Graph.Uwp.Controls
|
|||
/// </summary>
|
||||
public string OrderBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GraphPresenter"/> class.
|
||||
/// </summary>
|
||||
public GraphPresenter()
|
||||
{
|
||||
Loaded += GraphPresenter_Loaded;
|
||||
}
|
||||
|
||||
private async void GraphPresenter_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||
|
||||
// Note: some interfaces from the Graph SDK don't implement IBaseRequestBuilder properly, see https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/722
|
||||
if (RequestBuilder != null)
|
||||
if (this.RequestBuilder != null)
|
||||
{
|
||||
var request = new BaseRequest(RequestBuilder.RequestUrl, RequestBuilder.Client) // TODO: Do we need separate Options here?
|
||||
var request = new BaseRequest(this.RequestBuilder.RequestUrl, this.RequestBuilder.Client) // TODO: Do we need separate Options here?
|
||||
{
|
||||
Method = HttpMethods.GET,
|
||||
QueryOptions = QueryOptions?.Select(option => (Microsoft.Graph.QueryOption)option)?.ToList() ?? new List<Microsoft.Graph.QueryOption>(),
|
||||
QueryOptions = this.QueryOptions?.Select(option => (Microsoft.Graph.QueryOption)option)?.ToList() ?? new List<Microsoft.Graph.QueryOption>(),
|
||||
};
|
||||
|
||||
// Handle Special QueryOptions
|
||||
if (!string.IsNullOrWhiteSpace(OrderBy))
|
||||
if (!string.IsNullOrWhiteSpace(this.OrderBy))
|
||||
{
|
||||
request.QueryOptions.Add(new Microsoft.Graph.QueryOption("$orderby", OrderBy));
|
||||
request.QueryOptions.Add(new Microsoft.Graph.QueryOption("$orderby", this.OrderBy));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var response = await request.SendAsync<object>(null, CancellationToken.None).ConfigureAwait(false) as JObject;
|
||||
var responseObj = await request.SendAsync<object>(null, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
if (responseObj is JsonElement responseElement)
|
||||
{
|
||||
//// TODO: Deal with paging?
|
||||
|
||||
var values = response["value"];
|
||||
var value = responseElement.GetProperty("value");
|
||||
object data = null;
|
||||
|
||||
if (IsCollection)
|
||||
if (this.IsCollection)
|
||||
{
|
||||
data = values.ToObject(Array.CreateInstance(ResponseType, 0).GetType());
|
||||
data = value.EnumerateArray().ToList().Select(elem => System.Text.Json.JsonSerializer.Deserialize(elem.GetRawText(), this.ResponseType));
|
||||
}
|
||||
else
|
||||
{
|
||||
data = values.ToObject(ResponseType);
|
||||
data = System.Text.Json.JsonSerializer.Deserialize(value.GetRawText(), this.ResponseType);
|
||||
}
|
||||
|
||||
_ = dispatcherQueue.EnqueueAsync(() => Content = data);
|
||||
_ = dispatcherQueue.EnqueueAsync(() => this.Content = data);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Graph" Version="4.0.0" />
|
||||
<PackageReference Include="Microsoft.Graph" Version="4.2.0" />
|
||||
<PackageReference Include="Microsoft.Toolkit" Version="7.1.0-preview1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -1,94 +1,63 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Authors>Microsoft.Toolkit</Authors>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||
<PackageIconUrl>https://raw.githubusercontent.com/CommunityToolkit/CommunityToolkit/master/build/nuget.png</PackageIconUrl>
|
||||
<PackageProjectUrl>https://github.com/CommunityToolkit/WindowsCommunityToolkit</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/master/License.md</PackageLicenseUrl>
|
||||
<PackageReleaseNotes>https://github.com/CommunityToolkit/WindowsCommunityToolkit/releases</PackageReleaseNotes>
|
||||
<Copyright>(c) .NET Foundation and Contributors. All rights reserved.</Copyright>
|
||||
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Toolkit.ruleset</CodeAnalysisRuleSet>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<IsDesignProject>$(MSBuildProjectName.Contains('.Design'))</IsDesignProject>
|
||||
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
|
||||
<IsUwpProject Condition="'$(IsDesignProject)' != 'true'">$(MSBuildProjectName.Contains('Uwp'))</IsUwpProject>
|
||||
<IsSampleProject>$(MSBuildProjectName.Contains('Sample'))</IsSampleProject>
|
||||
<IsWpfProject>$(MSBuildProjectName.Contains('Wpf'))</IsWpfProject>
|
||||
<DefaultTargetPlatformVersion>19041</DefaultTargetPlatformVersion>
|
||||
<DefaultTargetPlatformMinVersion>17763</DefaultTargetPlatformMinVersion>
|
||||
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\nupkg</PackageOutputPath>
|
||||
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
|
||||
<BuildToolsDirectory>$(RepositoryDirectory)build\</BuildToolsDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SignAssembly Condition="'$(SignAssembly)' == '' and '$(IsUwpProject)' != 'true'" >true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.Common.props" />
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(IsTestProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
|
||||
<When Condition="$(IsCoreProject)">
|
||||
<PropertyGroup>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageOutputPath>$(RepositoryDirectory)bin\nupkg</PackageOutputPath>
|
||||
<GenerateLibraryLayout Condition="$(IsUwpProject)">true</GenerateLibraryLayout>
|
||||
<!--<TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>-->
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsPublishable>false</IsPublishable>
|
||||
<NoWarn>$(NoWarn);CS8002;SA0001</NoWarn>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="$(IsUwpProject)">
|
||||
<PropertyGroup>
|
||||
<!-- Code CS8002 is a warning for strong named -> non-strong-named reference. This is valid for platforms other than .NET Framework (and is needed for the UWP targets. -->
|
||||
<NoWarn>$(NoWarn);CS8002</NoWarn>
|
||||
<!-- For including default @(Page) and @(Resource) items via 'MSBuild.Sdk.Extras' Sdk package. Also provides up to date check and file nesting -->
|
||||
<ExtrasEnableDefaultXamlItems>true</ExtrasEnableDefaultXamlItems>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="('$(IsUwpProject)' == 'true') and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
|
||||
<PropertyGroup>
|
||||
<GenerateLibraryLayout>true</GenerateLibraryLayout>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
|
||||
<When Condition="!$(IsSampleProject) and '$(SourceLinkEnabled)' != 'false'">
|
||||
<PropertyGroup>
|
||||
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
|
||||
<!-- Declare that the Repository URL can be published to NuSpec -->
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<!-- Optional: Embed source files that are not tracked by the source control manager to the PDB -->
|
||||
<!-- Embed source files that are not tracked by the source control manager to the PDB -->
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!-- Optional: Include PDB in the built .nupkg -->
|
||||
<!-- Include PDB in the built .nupkg -->
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(IsTestProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true' and '$(IsWpfProject)' != 'true'">
|
||||
<ItemGroup>
|
||||
<!--<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="15.3.83" PrivateAssets="all" />-->
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
|
||||
|
||||
<EmbeddedResource Include="**\*.rd.xml" />
|
||||
<Page Include="**\*.xaml" Exclude="**\bin\**\*.xaml;**\obj\**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
|
||||
<Compile Update="**\*.xaml.cs" DependentUpon="%(Filename)" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release' or '$(Configuration)' == 'CI'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<PropertyGroup Condition="'$(IsUwpProject)' == 'true'">
|
||||
|
||||
<!-- 8002 is a strong named -> non-strong-named reference -->
|
||||
<!-- This is valid for platforms other than .NET Framework (and is needed for the UWP targets -->
|
||||
<NoWarn>$(NoWarn);8002</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,24 +1,25 @@
|
|||
<Project>
|
||||
<Choose>
|
||||
<When Condition="'$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'uap10.0.17763' or '$(TargetFramework)' == 'native' or '$(TargetFramework)' == 'net461'">
|
||||
<!-- UAP versions for uap10.0 where TPMV isn't implied -->
|
||||
|
||||
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.Common.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetPlatformVersion>10.0.$(DefaultTargetPlatformVersion).0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.$(DefaultTargetPlatformMinVersion).0</TargetPlatformMinVersion>
|
||||
<DebugType>Full</DebugType>
|
||||
<UseUWP Condition="($(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'net461')">true</UseUWP>
|
||||
<UseUWP Condition="'$(UseUWP)' == ''">false</UseUWP>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SDKReference Condition="'$(UseWindowsDesktopSdk)' == 'true' " Include="WindowsDesktop, Version=$(TargetPlatformVersion)">
|
||||
<Name>Windows Desktop Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
<SDKReference Condition="'$(UseWindowsMobileSdk)' == 'true' " Include="WindowsMobile, Version=$(TargetPlatformVersion)">
|
||||
<Name>Windows Mobile Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="!($(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'native' or $(IsSampleProject))">
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.UWP.Build.targets" Condition="$(UseUWP)" />
|
||||
|
||||
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.Workarounds.Xaml.targets" Condition="$(IsCoreProject)" />
|
||||
|
||||
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
|
||||
<ItemGroup>
|
||||
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
|
||||
|
@ -27,4 +28,5 @@
|
|||
</AssemblyAttribute>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -160,7 +160,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Graph">
|
||||
<Version>4.0.0</Version>
|
||||
<Version>4.2.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.2.12</Version>
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<Version>5.10.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Graph">
|
||||
<Version>4.0.0</Version>
|
||||
<Version>4.2.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.2.12</Version>
|
||||
|
|
|
@ -21,6 +21,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Confi
|
|||
settings.xamlstyler = settings.xamlstyler
|
||||
stylecop.json = stylecop.json
|
||||
version.json = version.json
|
||||
build\Windows.Toolkit.Common.props = build\Windows.Toolkit.Common.props
|
||||
build\Windows.Toolkit.Common.targets = build\Windows.Toolkit.Common.targets
|
||||
build\Windows.Toolkit.UWP.Build.targets = build\Windows.Toolkit.UWP.Build.targets
|
||||
build\Windows.Toolkit.Workarounds.Xaml.targets = build\Windows.Toolkit.Workarounds.Xaml.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleTest", "SampleTest\SampleTest.csproj", "{26F5807A-25B5-4E09-8C72-1749C4C59591}"
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Company>.NET Foundation</Company>
|
||||
<Authors>Microsoft.Toolkit</Authors>
|
||||
<Product>Windows Community Toolkit</Product>
|
||||
<CommonTags>Windows;Community;Toolkit;WCT;Graph;Authentication;</CommonTags>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<Copyright>(c) .NET Foundation and Contributors. All rights reserved.</Copyright>
|
||||
<PackageProjectUrl>https://github.com/CommunityToolkit/Graph-Controls</PackageProjectUrl>
|
||||
<PackageReleaseNotes>https://github.com/CommunityToolkit/Graph-Controls/releases</PackageReleaseNotes>
|
||||
<PackageIcon>Icon.png</PackageIcon>
|
||||
<PackageIconUrl>https://raw.githubusercontent.com/CommunityToolkit/Graph-Controls/main/build/nuget.png</PackageIconUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Features>Strict</Features>
|
||||
<Nullable>Disable</Nullable>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetPlatformBaseVersion>10.0</TargetPlatformBaseVersion>
|
||||
<TargetPlatformRevision>19041</TargetPlatformRevision>
|
||||
<TargetPlatformMinRevision>17763</TargetPlatformMinRevision>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<IsSampleProject>$(MSBuildProjectName.Contains('.Sample'))</IsSampleProject>
|
||||
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
|
||||
<IsUwpProject>$(MSBuildProjectName.Contains('.Uwp'))</IsUwpProject>
|
||||
<IsCoreProject Condition="'$(IsCoreProject)' == ''">True</IsCoreProject>
|
||||
<IsCoreProject Condition="$(IsSampleProject) or $(IsTestProject)">False</IsCoreProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsPublishable>true</IsPublishable>
|
||||
<ContinuousIntegrationBuild>$(TF_BUILD)</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,24 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- TODO: Dynamically generate Title if one wasn't set -->
|
||||
<Title Condition="'$(Title)' == ''">$(Product) Asset</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<CommonTags Condition="$(IsCoreProject)">$(CommonTags);.NET</CommonTags>
|
||||
<CommonTags Condition="$(IsUwpProject)">$(CommonTags);UWP</CommonTags>
|
||||
<PackageTags Condition="'$(PackageTags)' != ''">$(CommonTags);$(PackageTags)</PackageTags>
|
||||
<PackageTags Condition="'$(PackageTags)' == ''">$(CommonTags)</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="$(IsPackable)">
|
||||
<None Include="$(BuildToolsDirectory)nuget.png" Pack="true" PackagePath="\Icon.png" />
|
||||
<None Include="$(RepositoryDirectory)License.md" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="$(RepositoryDirectory)stylecop.json" Link="stylecop.json" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,19 @@
|
|||
<Project>
|
||||
|
||||
<!-- 'TargetPlatform*Version' for uap10.0 where TPMV isn't implied -->
|
||||
<PropertyGroup>
|
||||
<TargetPlatformVersion>$(TargetPlatformBaseVersion).$(TargetPlatformRevision).0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>$(TargetPlatformBaseVersion).$(TargetPlatformMinRevision).0</TargetPlatformMinVersion>
|
||||
<DebugType Condition="'$(DebugType)' == ''">Portable</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SDKReference Include="WindowsDesktop, Version=$(TargetPlatformVersion)" Condition="'$(UseWindowsDesktopSdk)' == 'true'">
|
||||
<Name>Windows Desktop Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
<SDKReference Include="WindowsMobile, Version=$(TargetPlatformVersion)" Condition="'$(UseWindowsMobileSdk)' == 'true'">
|
||||
<Name>Windows Mobile Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,12 @@
|
|||
<Project>
|
||||
|
||||
<!-- https://weblogs.asp.net/rweigelt/disable-warnings-in-generated-c-files-of-uwp-app -->
|
||||
<Target Name="_DisableWarningsInGeneratedSources" AfterTargets="MarkupCompilePass2">
|
||||
<ItemGroup>
|
||||
<GeneratedSource Include="**\*.g.cs;**\*.g.i.cs" />
|
||||
</ItemGroup>
|
||||
<Message Text="GeneratedSource: @(GeneratedSource->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedSource->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче