-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue a warning on restore about obsolete DotNetCliToolReference #2064
Issue a warning on restore about obsolete DotNetCliToolReference #2064
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
BeforeTargets="CollectPackageReferences" | ||
Condition=" '$(SuppressObsoleteDotNetCliToolWarning)' != 'true' "> | ||
<Warning Code="DOTNET1018" | ||
Text="Using DotNetCliToolReference to reference '%(_ReferenceToObsoleteDotNetCliTool.Identity)' is obsolete and can be removed from this project. This tool is bundled by default in the .NET Core SDK." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be localized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to. How?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have NETSdkError task. We briefly had NETSdkWarning but I believe it was just deleted due to being unused. Resurrect it from history and use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added NETSdkWarning.
<Target Name="_WarnAboutObsoleteDotNetCliToolReferences" | ||
BeforeTargets="CollectPackageReferences" | ||
Condition=" '$(SuppressObsoleteDotNetCliToolWarning)' != 'true' "> | ||
<Warning Code="DOTNET1018" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was this code chosen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found the highest DOTNET code in https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/Resources/Strings.resx and added one.
https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/Resources/Strings.resx#L195
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those are mostly left over from Nat defensively putting a bunch of messages from project.json era dotnet and nuget in strings.resx before v1 loc deadline just in case we needed them. We don't set Code elsewhere but probably should. I'd follow the current pattern here and we can file a bug to assign codes and use throughout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, opened this issue to follow up #2065
@@ -394,7 +394,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
<RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments> | |||
</PropertyGroup> | |||
</When> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has tons of unrelated whitespace changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the noise. VS Code made me do it.
@@ -20,6 +20,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
|
|||
<UsingTask TaskName="GetDependsOnNETStandard" AssemblyFile="$(MicrosoftNETBuildExtensionsTasksAssembly)" /> | |||
<UsingTask TaskName="NETBuildExtensionsError" AssemblyFile="$(MicrosoftNETBuildExtensionsTasksAssembly)" /> | |||
<UsingTask TaskName="NETBuildExtensionsWarning" AssemblyFile="$(MicrosoftNETBuildExtensionsTasksAssembly)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any extensions warnings yet so this is unnecessary task load. We can wait for first use to add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually load is clearly lazy extensions error is busted now due to build refactoring breaking ifdef, so this is ok.
By the way, if I want to get this into preview2, should I change the branch this PR targets? |
Ok. I'm going to retarget this PR to release/2.1.3xx to make sure this gets in for preview2. |
77b1f7c
to
0adce77
Compare
Tests are currently failing on |
@dotnet-bot test Ubuntu14.04 Debug |
@dotnet-bot test Windows_NT Release |
I'm still getting some test failures on a few CI runs that appear unrelated to my change. Am I okay to merge anyways? |
One last attempt. @dotnet-bot test Windows_NT Release |
@johnbeisner is looking at flaky SDK tests for prod con. I think we are just hitting evidence of that in regular CI as well. |
@dotnet-bot test OSX10.12 Release please |
CI pr tests finally passed ✅ :D |
0adce77
to
2d87ce7
Compare
…112.5 (#2064) [main] Update dependencies from dotnet/arcade
Resolves #2014
I will make a corresponding change to dotnet/cli to generate Microsoft.NETCoreSdk.BundledCliTools.props with a list of obsolete package IDs to match https://github.com/dotnet/cli/blob/master/build/BundledDotnetTools.props.
VS:
Command line:
FYI @muratg @DamianEdwards @prafullbhosale @divega @bricelam @Eilon