Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Target netcoreapp2.1, eliminate warnings, treat warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nguerrera committed Aug 26, 2017
1 parent 64bcbf4 commit d811bae
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 8 deletions.
9 changes: 9 additions & 0 deletions build/BuildDefaults.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 2 additions & 0 deletions build/sdks/sdks.csproj
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
3 changes: 2 additions & 1 deletion src/dotnet/HelpException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ 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.")]
/// <remarks>This is intended to facilitate refactoring during parser replacement and should not be used after that work is done.</remarks>
///
public class HelpException : Exception
{
public HelpException(string message) : base(message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public override int Execute()
catch (IOException ioex)
{
// Catch IOException from Path.GetTempFileName() and throw a graceful exception to the user.
throw new GracefulException(string.Format(LocalizableStrings.CmdDGFileIOException, projectFilePath));
throw new GracefulException(string.Format(LocalizableStrings.CmdDGFileIOException, projectFilePath), ioex);
}

GetProjectDependencyGraph(projectFilePath, tempDgFilePath);
Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/redist/redist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/tool_fsharp/tool_fsc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PublishDir>$(FSharpDirectory)</PublishDir>
<VersionSuffix>$(CommitCount)</VersionSuffix>
Expand Down
2 changes: 1 addition & 1 deletion src/tool_roslyn/tool_roslyn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit d811bae

Please sign in to comment.