Skip to content
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

[WIP] Add warning for ref to netstandard >= 1.5 from netfx without built-in support #2316

Closed

Conversation

nguerrera
Copy link
Contributor

@nguerrera nguerrera commented Jun 7, 2018

I'm handing this off to a teammate while I'm away.

Still TODO:

  • Confirm final error message text with PMs
  • Make sure fwlink points to valid content
  • Tests
    • The existing tests of the extensions adding support files probably just need to be updated to also check for the correct warning or lack thereof. The matrix is the same as the cases where we do/do not add support files:
    • .NETFramework < 4.7.2 -> .NETStandard >= 1.5 --> warning
    • .NETFramework any -> .NETStandard < 1.5 --> no warning
    • .NETFramework >= 4.7.2 -> .NETStandard any --> no warning
    • Warning can be suppressed

@nguerrera
Copy link
Contributor Author

NOTE: Error code may still change as this will conflict with #2282

@nguerrera
Copy link
Contributor Author

Another TODO item: suppression mechanism.

It should work to do <MSBuildWarningsAsMessages>NETSDK1066</MSBuildWarningsAsMessages> in .csproj. See dotnet/msbuild#1928

I think we should leverage this moving forward now that our errors have codes and stop adding individual booleans for everything.

But this needs testing.

The doc at the fwlink should cover how to suppress if things are working fine for you and you haven't been impacted by the known issues.

@@ -381,4 +381,8 @@ The following are names of parameters or literal values and should not be transl
<value>NETSDK1065: Cannot find app host for {0}. {0} could be an invalid runtime identifier (RID). For more information about RID, see https://aka.ms/rid-catalog.</value>
<comment>{StrBegin="NETSDK1065: "}</comment>
</data>
</root>
<data name="NETFrameworkToNonBuiltInNETStandard" xml:space="preserve">
<value>NETSDK1066: You’re using a .NET Standard 1.5 or higher library but targeting a .NET Framework without built-in support. Visit https://go.microsoft.com/fwlink/?linkid=874511 for a set of known issues. Consider retargeting to .NET Framework 4.7.2.</value>
Copy link
Member

Choose a reason for hiding this comment

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

Suggest:

This project uses a library that targets .NET Standard 1.5 or higher and targets a version of .NET Framework that does not have built-in support for that version of .NET Standard. Visit https://go.microsoft.com/fwlink/?linkid=874511 for a set of known issues. Consider retargeting to .NET Framework 4.7.2.

I'd also suggest creating an aka.ms link instead of a fwlink, that way we can choose a name that's easier to type in, for example http://aka.ms/net-standard-known-issues.

@mairaw Can you review this for style?

Copy link
Contributor

Choose a reason for hiding this comment

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

Your suggestion LGTM @dsplaisted! Only nit per Microsoft style guide is the use of contractions
does not -> doesn't

@wli3
Copy link

wli3 commented Jun 13, 2018

Continue at #2330

@wli3 wli3 closed this Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants