Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Bump AssemblyVersion for nestandard.dll to 2.1.0.0 #1047

Merged
merged 17 commits into from Jan 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 13 additions & 6 deletions Directory.Build.props
Expand Up @@ -11,6 +11,17 @@
<ToolSetCommonDirectory>$(MSBuildThisFileDirectory)artifacts\toolset\Common\</ToolSetCommonDirectory>
</PropertyGroup>

<!-- Need to set ProjectAssetsFile to something so it doesn't get set to the Tools.proj assets file when we import the generated props -->
<PropertyGroup>
<ProjectAssetsFile Condition="'$(ProjectAssetsFile)' == ''">unused</ProjectAssetsFile>
</PropertyGroup>

<Import Project="$(ToolSetCommonDirectory)Tools.proj.nuget.g.props" Condition="Exists('$(ToolSetCommonDirectory)Tools.proj.nuget.g.props')" />

<PropertyGroup>
<ProjectAssetsFile Condition="'$(ProjectAssetsFile)' == 'unused'"></ProjectAssetsFile>
</PropertyGroup>

<!-- Common repo directories -->
<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
Expand All @@ -31,13 +42,9 @@
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>

<!-- Need to set ProjectAssetsFile to something so it doesn't get set to the Tools.proj assets file when we import the generated props -->
<PropertyGroup>
<ProjectAssetsFile Condition="'$(ProjectAssetsFile)' == ''">unused</ProjectAssetsFile>
</PropertyGroup>
<Import Project="$(ToolSetCommonDirectory)Tools.proj.nuget.g.props" Condition="Exists('$(ToolSetCommonDirectory)Tools.proj.nuget.g.props')" />
<!-- Set maximum version for NetStandard to 2.1, since we're now producing 2.1 out of this repo -->
<PropertyGroup>
<ProjectAssetsFile Condition="'$(ProjectAssetsFile)' == 'unused'"></ProjectAssetsFile>
<NETStandardMaximumVersion>2.1</NETStandardMaximumVersion>
</PropertyGroup>

<!-- workaround https://github.com/dotnet/sdk/issues/2288
Expand Down
5 changes: 5 additions & 0 deletions NuGet.config
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- Don't use any higher level config files.
Our builds need to be isolated from user/machine state -->
<fallbackPackageFolders>
<clear />
</fallbackPackageFolders>
<packageSources>
<clear />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
Expand Down
4 changes: 4 additions & 0 deletions eng/Tools.props
Expand Up @@ -11,6 +11,8 @@

<!-- Need to keep in sync with CodeAnalysis.targets file. -->
<AnalyzerPropsFile>$(ArtifactsToolsetDir)Common\Tools.Analyzers.props</AnalyzerPropsFile>
<!-- Don't use implicit fallback folder for packages -->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="$(MicrosoftDotNetApiCompatPackageVersion)" />
Expand All @@ -22,6 +24,8 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Microsoft.SourceLink.Vsts.Git" Version="$(MicrosoftSourceLinkVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />

<PackageReference Include="$(NetStandardLibraryPackage)" Version="$(NetStandardLibraryPackageVersion)" ExcludeAssets="All" />

<!-- Reference analyzers -->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0" />
<PackageReference Include="Microsoft.DotNet.CodeAnalysis" Version="$(MicrosoftDotNetCodeAnalysisPackageVersion)" />
Expand Down
3 changes: 3 additions & 0 deletions eng/Version.Details.xml
Expand Up @@ -22,5 +22,8 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>52d4b539dd1ab771015bdf33ed4221afcaaabf3d</Sha>
</Dependency>
<PinnedDependency Name="NETStandard.Library" Version="2.0.3">
<Uri>https://github.com/dotnet/standard</Uri>
</PinnedDependency>
</ToolsetDependencies>
</Dependencies>
8 changes: 8 additions & 0 deletions eng/Versions.props
Expand Up @@ -20,10 +20,18 @@
<XmlDocPackage>Microsoft.Private.Intellisense</XmlDocPackage>
<XmlDocPackageVersion>2.0.0-preview3-26209-0</XmlDocPackageVersion>
</PropertyGroup>

<PropertyGroup>
<NetStandardLibraryPackage>netstandard.library</NetStandardLibraryPackage>
</PropertyGroup>

<PropertyGroup>
<MicrosoftDotNetApiCompatPackageVersion>1.0.0-beta.19061.6</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksPackagingPackageVersion>1.0.0-beta.19061.6</MicrosoftDotNetBuildTasksPackagingPackageVersion>
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.19061.6</MicrosoftDotNetCodeAnalysisPackageVersion>
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19061.6</MicrosoftDotNetGenAPIPackageVersion>

<!-- This is the LKG stable version of NetStandard.Library from myget.org. Please don't edit this version -->
<NetStandardLibraryPackageVersion>2.0.3</NetStandardLibraryPackageVersion>
</PropertyGroup>
</Project>
12 changes: 11 additions & 1 deletion src/netstandard/pkg/NETStandard.Library.pkgproj
Expand Up @@ -10,7 +10,7 @@
<SkipValidatePackage>true</SkipValidatePackage>
<TargetsFileName>NETStandard.Library.targets</TargetsFileName>
<VersionTargetsTemplate>targets\netstandard\$(TargetsFileName)</VersionTargetsTemplate>
<NETStandardVersion>netstandard2.0</NETStandardVersion>
<NETStandardVersion>netstandard2.1</NETStandardVersion>
<VersionTargetsSource>$(IntermediateOutputPath)$(NETStandardVersion)\$(TargetsFileName)</VersionTargetsSource>
</PropertyGroup>

Expand All @@ -25,15 +25,25 @@
<Facade>true</Facade>
</ProjectReference>

<NetStandard20Files Include="$(PackagesDir)$(NetStandardLibraryPackage)/$(NetStandardLibraryPackageVersion)/build/netstandard2.0/**">
<TargetPath>build/netstandard2.0/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
</NetStandard20Files>

<File Include="$(VersionTargetsSource)">
<TargetPath>build/$(NETStandardVersion)/$(Id).targets</TargetPath>
</File>

<File Include="$(PlaceHolderFile)">
<TargetPath>lib/netstandard1.0</TargetPath>
</File>

<File Include="@(NetStandard20Files)" />
</ItemGroup>

<Target Name="EnsureRestoredNetStandardAssets" BeforeTargets="GenerateNuSpec">
<Error Condition="'@(NetStandard20Files)' == ''" Text="Could not find package assets for netstandard2.0" />
</Target>

<Target Name="StampTargets" BeforeTargets="GenerateNuSpec">
<PropertyGroup>
<_FacadeFiles Condition="'%(File.Facade)' == 'true' AND '%(File.Extension)' == '.dll'" >@(File->'%24(MSBuildThisFileDirectory)ref\%(FileName)%(Extension)')</_FacadeFiles>
Expand Down
2 changes: 1 addition & 1 deletion src/netstandard/pkg/shims/netfx/Directory.Build.props
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShimRelOutputPath>netfx</ShimRelOutputPath>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<!-- Treat this as a reference assembly because it needs to packaged in the ref folder -->
<IsReferenceAssembly>true</IsReferenceAssembly>
</PropertyGroup>
Expand Down
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShimRelOutputPath>netstandard</ShimRelOutputPath>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<!-- Treat this as a reference assembly because it needs to packaged in the ref folder -->
<IsReferenceAssembly>true</IsReferenceAssembly>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/netstandard/ref/netstandard.csproj
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<IsCoreAssembly>true</IsCoreAssembly>
<!-- disable obsolete warnings/errors -->
<NoWarn>$(NoWarn);0618;0619;0809</NoWarn>
Expand Down
4 changes: 3 additions & 1 deletion src/netstandard/src/netstandard.csproj
@@ -1,11 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<TargetFrameworks>net461;xamarin.ios;xamarin.watchos;xamarin.tvos;xamarin.mac;monoandroid</TargetFrameworks>
<!-- custom target framework settings to satisfy SDK and msbuild. -->
<TargetFrameworkIdentifier Condition="'$(TargetFramework)' != 'net461'">$(TargetFramework)</TargetFrameworkIdentifier>
<TargetFrameworkVersion Condition="'$(TargetFramework)' != 'net461'">0.0</TargetFrameworkVersion>
<!-- Use fallback until we have a compatibility mapping for netstandard2.1. -->
<AssetTargetFallback>netstandard2.1</AssetTargetFallback>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DisableStandardFrameworkResolution>true</DisableStandardFrameworkResolution>
<ContractProject>..\ref\netstandard.csproj</ContractProject>
Expand Down
6 changes: 3 additions & 3 deletions src/platforms/Directory.Build.props
Expand Up @@ -8,10 +8,10 @@
<LangVersion>7.2</LangVersion>

<!-- custom target framework settings to satisfy SDK and msbuild. -->
<TargetFrameworkVersion Condition="'$(TargetFramework)' != 'net461'">0.0</TargetFrameworkVersion>
<TargetFrameworkIdentifier Condition="'$(TargetFramework)' != 'net461'">$(TargetFramework)</TargetFrameworkIdentifier>
<TargetFrameworkVersion Condition="!$(TargetFramework.StartsWith('net4')) and !$(TargetFramework.StartsWith('netstandard'))">0.0</TargetFrameworkVersion>
<TargetFrameworkIdentifier Condition="!$(TargetFramework.StartsWith('net4')) and !$(TargetFramework.StartsWith('netstandard'))">$(TargetFramework)</TargetFrameworkIdentifier>
<DisableStandardFrameworkResolution>true</DisableStandardFrameworkResolution>
<ImplicitlyExpandNETStandardFacades>false</ImplicitlyExpandNETStandardFacades>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
</Project>
</Project>
10 changes: 9 additions & 1 deletion src/platforms/extensions/Directory.Build.props
@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<!-- Disable code paths that require project.assets.json files to be present or to be computed. -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you need these? They all look netcoreapp specific, I wouldn't expect them to be causing a problem for netstandard build.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes to disable the Target that tries to resolve stuff from project.assets.json, without it I get the following error:

E:\code\standard.dotnet\sdk\2.1.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(129,5): error NETSDK1004: Assets file 'E:\code\standard\artifacts\obj\System.CodeDom\project.assets.json' not found. Run a NuGet package restore to generate this file. [E:\code\standard\src\platforms\extensions\System.CodeDom.csproj]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that's annoying. It looks like SDK does indeed try to do this for netstandard projects. What changed that caused that to start breaking?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess just the retargeting to ns2.1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider a followup PR to centralize these properties.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol. One of my follow-up PRs would have been to bring back project restore so that we don't need these hacks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better 👍

<PropertyGroup>
<GenerateDependencyFile>false</GenerateDependencyFile>
<ComputeNETCoreBuildOutputFiles>false</ComputeNETCoreBuildOutputFiles>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

<Import Condition="Exists('..\Directory.Build.props')" Project="..\Directory.Build.props" />

<Target Name="MarkProjectReferencesAsNotPrivate" BeforeTargets="AssignProjectConfiguration">
Expand Down