This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #617 from dotnet/libtemplate
Merge latest Library.Template
- Loading branch information
Showing
163 changed files
with
1,312 additions
and
949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: nuget | ||
directory: / | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"files.trimTrailingWhitespace": true, | ||
"files.insertFinalNewline": true, | ||
"files.trimFinalNewlines": true | ||
"files.trimTrailingWhitespace": true, | ||
"files.insertFinalNewline": true, | ||
"files.trimFinalNewlines": true, | ||
"omnisharp.enableEditorConfigSupport": true, | ||
"omnisharp.enableImportCompletion": true, | ||
"omnisharp.enableRoslynAnalyzers": true | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<RepoRootPath>$(MSBuildThisFileDirectory)</RepoRootPath> | ||
<BaseIntermediateOutputPath>$(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\</BaseIntermediateOutputPath> | ||
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\</BaseOutputPath> | ||
<PackageOutputPath>$(RepoRootPath)bin\$(Configuration)\Packages\</PackageOutputPath> | ||
<LangVersion>10.0</LangVersion> | ||
<Nullable>disable</Nullable> | ||
<ImplicitUsings>disable</ImplicitUsings> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly> | ||
|
||
<!-- https://github.com/dotnet/msbuild/blob/main/documentation/ProjectReference-Protocol.md#setplatform-negotiation --> | ||
<EnableDynamicPlatformResolution>false</EnableDynamicPlatformResolution> | ||
|
||
<!-- Opt in till https://github.com/NuGet/Home/issues/9803 makes this the default. --> | ||
<RestoreUseStaticGraphEvaluation>false</RestoreUseStaticGraphEvaluation> | ||
|
||
<!-- This entire repo has just one version.json file, so compute the version once and share with all projects in a large build. --> | ||
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory> | ||
|
||
<!-- Local builds should embed PDBs so we never lose them when a subsequent build occurs. --> | ||
<DebugType Condition=" '$(CI)' != 'true' and '$(TF_BUILD)' != 'true' ">embedded</DebugType> | ||
|
||
<NoWarn>$(NoWarn);CS1591;CA1401</NoWarn> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<SignAssembly>true</SignAssembly> | ||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)strongname.snk</AssemblyOriginatorKeyFile> | ||
|
||
<DesktopOnlyFrameworks>net45</DesktopOnlyFrameworks> | ||
<PlatformSpecificFrameworks>$(DesktopOnlyFrameworks);uap10.0.19041</PlatformSpecificFrameworks> | ||
<PortableOnlyFrameworks>netstandard2.0</PortableOnlyFrameworks> | ||
<PlatformAndPortableFrameworks>$(PortableOnlyFrameworks);$(PlatformSpecificFrameworks)</PlatformAndPortableFrameworks> | ||
|
||
<TargetPlatformMinVersion Condition=" '$(TargetFramework)' == 'win8' ">8.0</TargetPlatformMinVersion> | ||
|
||
<Title>PInvoke.$(MSBuildProjectName)</Title> | ||
<Authors>Andrew Arnott</Authors> | ||
<Summary>P/Invoke methods for the Windows $(MSBuildProjectName).dll.</Summary> | ||
<Description>P/Invoke methods for the Windows $(MSBuildProjectName).dll.</Description> | ||
<PackageProjectUrl>https://github.com/dotnet/pinvoke</PackageProjectUrl> | ||
<Copyright>Copyright © .NET Foundation and Contributors</Copyright> | ||
<Tags>pinvoke .net pcl</Tags> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<IncludeSymbols Condition=" '$(DebugType)' != 'embedded' ">true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" /> | ||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="all" /> | ||
<!-- Use the Unstable package ID so that update tools will help us keep it current even though it seems to be ever-unstable lately. --> | ||
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.435" PrivateAssets="all" /> | ||
<PackageReference Include="CSharpIsNullAnalyzer" Version="0.1.329" PrivateAssets="all" /> | ||
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup Condition=" '$(IsCodeGenerationProject)' != 'true' "> | ||
<ProjectReference Include="$(RepoRootPath)src\CodeGenerationAttributes\CodeGenerationAttributes.csproj" PrivateAssets="all"> | ||
<Private>false</Private> | ||
<OutputItemType>Analyzer</OutputItemType> | ||
</ProjectReference> | ||
<ProjectReference Include="$(RepoRootPath)src\CodeGeneration\CodeGeneration.csproj"> | ||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> | ||
<OutputItemType>Analyzer</OutputItemType> | ||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties> | ||
<UndefineProperties>TargetFramework</UndefineProperties> | ||
<Private>false</Private> | ||
</ProjectReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition=" '$(IsCodeGenerationProject)' != 'true' "> | ||
<RootNamespace>PInvoke</RootNamespace> | ||
<AssemblyName>PInvoke.$(MSBuildProjectName)</AssemblyName> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<GeneratorAssemblySearchPaths Include="$(RepoRootPath)bin\$(Configuration)\netstandard2.0\" /> | ||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)../stylecop.json"/> | ||
<None Include="$(MSBuildProjectName).exports.txt" Condition=" Exists('$(MSBuildProjectName).exports.txt') and '$(TargetFramework)' == 'net45' "> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
|
||
<ItemDefinitionGroup> | ||
<!-- We always want MSBuild properties generated that point at the restored location of each package. --> | ||
<PackageReference GeneratePathProperty="true" /> | ||
</ItemDefinitionGroup> | ||
|
||
<Target Name="PrepareReleaseNotes" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion"> | ||
<PropertyGroup> | ||
<PackageReleaseNotes>https://github.com/dotnet/pinvoke/releases/tag/v$(Version)</PackageReleaseNotes> | ||
</PropertyGroup> | ||
</Target> | ||
|
||
<PropertyGroup Condition="'$(IsWpfTempProject)' == ''"> | ||
<IsWpfTempProject>false</IsWpfTempProject> | ||
<IsWpfTempProject Condition="$(MSBuildProjectName.EndsWith('_wpftmp'))">true</IsWpfTempProject> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Inspired by https://github.com/dotnet/arcade/blob/cbfa29d4e859622ada3d226f90f103f659665d31/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.props#L14-L31 | ||
WPF temp-projects do not import .props and .targets files from NuGet packages. | ||
(see https://github.com/dotnet/sourcelink/issues/91). | ||
Property _TargetAssemblyProjectName is set by GenerateTemporaryTargetAssembly task. | ||
Disable Source Link and Xliff in WPF temp projects to avoid generating non-deterministic file names to obj dir. | ||
The project name is non-deterministic and is included in the Source Link json file name and xlf directory names. | ||
It's also not necessary to generate these assets. | ||
--> | ||
<PropertyGroup Condition="'$(IsWpfTempProject)' == 'true'"> | ||
<_WpfTempProjectNuGetFilePathNoExt>$(BaseIntermediateOutputPath)..\$(_TargetAssemblyProjectName)\$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g</_WpfTempProjectNuGetFilePathNoExt> | ||
|
||
<EnableSourceLink>false</EnableSourceLink> | ||
<EmbedUntrackedSources>false</EmbedUntrackedSources> | ||
<DeterministicSourcePaths>false</DeterministicSourcePaths> | ||
<EnableXlfLocalization>false</EnableXlfLocalization> | ||
</PropertyGroup> | ||
|
||
<!-- Workaround https://github.com/dotnet/wpf/issues/810 --> | ||
<Import Project="$(_WpfTempProjectNuGetFilePathNoExt).props" Condition="'$(_WpfTempProjectNuGetFilePathNoExt)' != '' and Exists('$(_WpfTempProjectNuGetFilePathNoExt).props')"/> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<!-- Workaround https://github.com/dotnet/wpf/issues/1718 --> | ||
<EmbedUntrackedSources Condition=" '$(UseWPF)' == 'true' ">false</EmbedUntrackedSources> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<ExcludeStoreBannedAPIs Condition=" ('$(TargetPlatformIdentifier)' == 'Windows' or '$(TargetPlatformIdentifier)' == 'UAP') and '$(TargetPlatformVersion)' >= 8.0 ">true</ExcludeStoreBannedAPIs> | ||
<DefineConstants Condition=" '$(ExcludeStoreBannedAPIs)' != 'true' ">$(DefineConstants);IncludeStoreBannedAPIs</DefineConstants> | ||
<DefineConstants Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' or ('$(TargetFrameworkIdentifier)' == '.NETStandard' and '$(_TargetFrameworkVersionWithoutV)' >= 2.0) ">$(DefineConstants);Serialization</DefineConstants> | ||
<DefineConstants Condition=" '$(TargetFrameworkIdentifier)' == '.NETStandard' and '$(_TargetFrameworkVersionWithoutV)' >= 2.0 ">$(DefineConstants);NETSTANDARD2_0_ORLATER</DefineConstants> | ||
<DefineConstants Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(_TargetFrameworkVersionWithoutV)' >= 4.5 ">$(DefineConstants);NET45_ORLATER</DefineConstants> | ||
|
||
<DefineConstants Condition=" '$(TargetFrameworkIdentifier)' != '.NETFramework' ">$(DefineConstants);APISets</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Remove="storebanned\**" Condition=" '$(ExcludeStoreBannedAPIs)' == 'true' " /> | ||
<Compile Remove="**" Condition=" '$(ExcludeStoreBannedAPIs)' == 'true' and '$(StoreBanned)' == 'true' " /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(IsPInvokeProject)' == 'true' and '$(MSBuildProjectName)' != 'Win32' and '$(TargetFramework)' == 'net45' "> | ||
<PackageReference Include="Roslyn.Diagnostics.Analyzers" Version="1.2.0-beta2" PrivateAssets="all" /> | ||
<AdditionalFiles Include="PublicAPI.Shipped.txt" /> | ||
<AdditionalFiles Include="PublicAPI.Unshipped.txt" /> | ||
</ItemGroup> | ||
|
||
<!-- Workaround win8 .targets defining a target that should be blank (https://github.com/dotnet/sdk/issues/2517) --> | ||
<Target Name="GetPackagingOutputs" /> | ||
|
||
<Import Project="$(_WpfTempProjectNuGetFilePathNoExt).targets" Condition="'$(_WpfTempProjectNuGetFilePathNoExt)' != '' and Exists('$(_WpfTempProjectNuGetFilePathNoExt).targets')"/> | ||
</Project> |
Oops, something went wrong.