Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Ensure a nuget package is being produced and resolve PR feedback
  • Loading branch information
tannergooding committed Jul 15, 2021
commit 45471303da31430ea410178f6a68131af3391a17
18 changes: 11 additions & 7 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<NativeBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'native', '$(NetCoreAppCurrentBuildSettings)'))</NativeBinDir>
<NetCoreAppCurrentTestHostPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'testhost', '$(NetCoreAppCurrentBuildSettings)'))</NetCoreAppCurrentTestHostPath>
<NetCoreAppCurrentTestHostSharedFrameworkPath>$([MSBuild]::NormalizeDirectory('$(NetCoreAppCurrentTestHostPath)', 'shared', '$(MicrosoftNetCoreAppFrameworkName)', '$(ProductVersion)'))</NetCoreAppCurrentTestHostSharedFrameworkPath>

<SymbolPackageOutputPath>$(PackageOutputPath)</SymbolPackageOutputPath>

<NoWarn Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == '.NETStandard' or ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '3.0')))">$(NoWarn);nullable</NoWarn>
Expand Down Expand Up @@ -282,10 +282,14 @@
</Choose>

<Target Name="LibIntellisenseDocs" Condition="'$(IncludeBuildOutput)' == 'true'">
<PropertyGroup>
<_intellisenseRootFolder>$(BuildOutputTargetFolder)</_intellisenseRootFolder>
<_intellisenseRootFolder Condition="'$(_intellisenseRootFolder)' == ''">lib</_intellisenseRootFolder>
</PropertyGroup>
<ItemGroup>
<TfmSpecificPackageFile Include="$(XmlDocFileRoot)1033\$(TargetName).xml"
Condition="Exists('$(XmlDocFileRoot)1033\$(TargetName).xml')"
PackagePath="lib/$(TargetFramework)" />
PackagePath="$(_intellisenseRootFolder)/$(TargetFramework)" />
</ItemGroup>
</Target>

Expand All @@ -294,8 +298,8 @@
</PropertyGroup>

<ItemGroup>
<!-- Ensure AnalyzerReference items are restored and built
The target framework of Analyzers has no relationship to that of the refrencing project,
<!-- Ensure AnalyzerReference items are restored and built
The target framework of Analyzers has no relationship to that of the refrencing project,
so we don't apply TargetFramework filters nor do we pass in TargetFramework.
When BuildProjectReferences=false we make sure to set BuildReference=false to make
sure not to try to call GetTargetPath in the outerbuild of the analyzer project. -->
Expand All @@ -313,9 +317,9 @@

<ItemGroup>
<Content Include="@(_AnalyzerFile)" Pack="True" Condition="!%(_AnalyzerFile.IsSymbol)" />
<!-- Symbols don't honor PackagePath. By default they are placed in lib/%(TargetFramework).
<!-- Symbols don't honor PackagePath. By default they are placed in lib/%(TargetFramework).
Pack does honor TargetPath and does Path.Combine("lib/%(TargetFramework)", "%(TargetPath)"),
so a rooted path value for TargetPath will override lib.
so a rooted path value for TargetPath will override lib.
https://github.com/NuGet/Home/issues/10860 -->
<_TargetPathsToSymbols Include="@(_AnalyzerFile)" TargetPath="/%(_AnalyzerFile.PackagePath)" Condition="%(_AnalyzerFile.IsSymbol)" />
</ItemGroup>
Expand All @@ -331,7 +335,7 @@
<_AnalyzerPackFile Include="@(_TargetPathsToSymbols)" IsSymbol="true" />
<_AnalyzerPackFile PackagePath="$(_analyzerPath)/%(TargetPath)" />
</ItemGroup>
<Error Condition="'%(_AnalyzerPackFile.TargetFramework)' != 'netstandard2.0'"
<Error Condition="'%(_AnalyzerPackFile.TargetFramework)' != 'netstandard2.0'"
Text="Analyzers must only target netstandard2.0 since they run in the compiler which targets netstandard2.0. The following files were found to target '%(_AnalyzerPackFile.TargetFramework)': @(_AnalyzerPackFile)" />
</Target>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
<IsNETCoreAppSrc>false</IsNETCoreAppSrc>
<EnableBinPlacing>false</EnableBinPlacing>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
<!-- disable warnings about obsolete APIs,
Remove warning disable when nullable attributes are respected,
Type has no accessible constructors which use only CLS-compliant types -->
<NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
<NoWarn>$(NoWarn);0809;0618;CS8614;CS3015;NU5131</NoWarn>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="'$(FeatureGenericMath)' == 'true'">$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants>
<PropertyGroup Condition="'$(FeatureGenericMath)' == 'true'">
<!-- Place this assembly in the nuget ref folder -->
<BuildOutputTargetFolder>ref</BuildOutputTargetFolder>
<DefineConstants>$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants>
<IsPackable>true</IsPackable>
<PackageDescription>Exposes new experimental APIs from System.Runtime</PackageDescription>
<PackageId>$(MSBuildProjectName)</PackageId>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.cs" />
Expand All @@ -25,9 +30,7 @@
<_FileVersionMin>$(FileVersion.Split('.')[1])</_FileVersionMin>
<_FileVersionBld>$(FileVersion.Split('.')[2])</_FileVersionBld>
<_FileVersionRev>$(FileVersion.Split('.')[3])</_FileVersionRev>
<FileVersion>$(_FileVersionMaj).$(_FileVersionMin).$([MSBuild]::Add($(_FileVersionBld), 100)).$(_FileVersionRev)</FileVersion>
</PropertyGroup>
<CreateProperty Value="$(_FileVersionMaj).$(_FileVersionMin).$([MSBuild]::Add($(_FileVersionBld), 100)).$(_FileVersionRev)">
<Output TaskParameter="Value" PropertyName="FileVersion" />
</CreateProperty>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInf
CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
# C# generates backing fields for fixed buffers as public.
TypesMustExist : Type 'System.IO.Enumeration.FileSystemEntry.<_fileNameBuffer>e__FixedBuffer' does not exist in the reference but it does exist in the implementation.

1 change: 1 addition & 0 deletions src/libraries/System.Runtime/src/System.Runtime.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Pull type forwards from the experimental ref assembly so we only need to maintain a single src project -->
<ContractProject>$(LibrariesProjectRoot)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj</ContractProject>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
Expand Down
1 change: 1 addition & 0 deletions src/libraries/libraries-packages.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />

<ProjectReference Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj" />
<ProjectReference Include="$(PkgDir)*\*.proj" Exclude="$(PkgDir)test\*" />
<ProjectReference Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
Condition="'$(BuildAllConfigurations)' == 'true'"
Expand Down