Use $(CliTargetFramework), eliminate warnings, treat warnings as errors

(cherry picked from commit 656eab7aec)
This commit is contained in:
Nick Guerrera 2017-09-27 13:28:45 -07:00
parent 87268c57ad
commit 138b98f65f
8 changed files with 17 additions and 7 deletions

View file

@ -7,5 +7,14 @@
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' ">true</UsePortableLinuxSharedFramework>
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == '' AND '$(Rid)' != 'linux-x64' ">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
<HighEntropyVA>true</HighEntropyVA>
<!-- Only use asset target fallback that we set (not implicit one to net461). -->
<DisableImplicitAssetTargetFallback>true</DisableImplicitAssetTargetFallback>
<!-- Disable asset target fallback warning globally since it does not work transitively on NoWarn of individual packages -->
<!-- Since we disabled the implict fallback to net461, this will only kick in when we have an explicit fallback and we don't need to be warned about it doing what we asked it to do. -->
<NoWarn>NU1701</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>

View file

@ -1,5 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<Import Project="..\DependencyVersions.props" />
<PropertyGroup>
<OutputType>Library</OutputType>
@ -9,6 +10,7 @@
<ItemGroup>
<PackageReference Include="$(DependencyPackageName)" Version="$(DependencyPackageVersion)" />
<PackageReference Condition="'$(DependencyPackageName)' == 'Microsoft.NET.Sdk.Web'" Include="Microsoft.NET.Sdk" Version="$(CLI_NETSDK_Version)" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -24,7 +24,7 @@
<PackageReference Include="NuGet.ProjectModel" Version="$(CLI_NuGet_Version)" />
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.0.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="XliffTasks" Version="$(XliffTasksVersion)" PrivateAssets="All" />
</ItemGroup>

View file

@ -6,7 +6,6 @@ namespace Microsoft.DotNet.Cli
///
/// <summary>Allows control flow to be interrupted in order to display help in the console.</summary>
///
[Obsolete("This is intended to facilitate refactoring during parser replacement and should not be used after that work is done.")]
public class HelpException : Exception
{
public HelpException(string message) : base(message)

View file

@ -2,13 +2,13 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<Version>$(SdkVersion)</Version>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<AssemblyName>dotnet</AssemblyName>
<OutputType>Exe</OutputType>
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4</AssetTargetFallback>
<AssetTargetFallback>dotnet5.4</AssetTargetFallback>
<RootNamespace>Microsoft.DotNet.Cli</RootNamespace>
</PropertyGroup>
<ItemGroup>

View file

@ -10,7 +10,7 @@
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4</AssetTargetFallback>
<AssetTargetFallback>dotnet5.4</AssetTargetFallback>
<PublishDir>$(SdkOutputDirectory)</PublishDir>
<VersionSuffix>$(CommitCount)</VersionSuffix>
</PropertyGroup>

View file

@ -4,7 +4,7 @@
<PropertyGroup>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PublishDir>$(FSharpDirectory)</PublishDir>
<VersionSuffix>$(CommitCount)</VersionSuffix>

View file

@ -4,7 +4,7 @@
<PropertyGroup>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PublishDir>$(RoslynDirectory)</PublishDir>