-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
csproj.md: Emphasise implicit version context #3006
Conversation
Emphasises that `RuntimeFrameworkVersion` and `NetStandardImplicitPackageVersion` only apply to .NET Core and .NET Standard projects respectively.
@dasMulli, |
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.
Thanks @dasMulli for following up on the issue and creating a PR for it. I think your changes greatly enhance the topic. I left a few comments to be addressed.
docs/core/tools/csproj.md
Outdated
@@ -33,10 +33,10 @@ Metapackages are implicitly referenced based on the target framework(s) specifie | |||
### Recommendations | |||
Since `Microsoft.NETCore.App` or `NetStandard.Library` metapackages are implicitly referenced, the following are our recommended best practices: | |||
|
|||
* Never have an explicit reference to the `Microsoft.NETCore.App` or `NetStandard.Library` metapackages via a `<PackageReference>` item in your project file. | |||
* If you need a specific version of the runtime, you should use the `<RuntimeFrameworkVersion>` property in your project (for example, `1.0.4`) instead of referencing the metapackage. | |||
* Never have an explicit reference to the `Microsoft.NETCore.App` or `NetStandard.Library` metapackages via a `<PackageReference>` item in your project file when trageting .NET Core or .NET Standard. |
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.
typo: tagreting
I'd also start with the condition: When targeting ..., never have ...
Also wondering if we want to be more explicit about the .NET Framework case here too?
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.
Thanks!
docs/core/tools/csproj.md
Outdated
* This might happen if you are using [self-contained deployments](../deploying/index.md#self-contained-deployments-scd) and you need a specific patch version of 1.0.0 LTS runtime, for example. | ||
* If you need a specific version of the `NetStandard.Library` metapackage, you can use the `<NetStandardImplicitPackageVersion>` property and set the version you need. | ||
* If you need a specific version of the `NetStandard.Library` metapackage when targeting .NET Standard, you can use the `<NetStandardImplicitPackageVersion>` property and set the version you need. | ||
* Do not explicitly add or update references to either the `Microsoft.NETCore.App` or `NetStandard.Library` metapackage in .NET Framework projects. If any version of `NetStandard.Library` should really be needed when using a .NET Standard based NuGet package, NuGet will automatically install the needed version. |
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.
@mairaw I've added this bullet point on .NET Framework. I'm a little worried about updating versions of NETStandard.Library
since 2.0.0 is bringing in targets and assemblies for ns2.0 support that might be dangerous if the user already has System.* packages installed in a packages.config project and no ns2.0 support installed.
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.
Changed wording based on feedback from @guardrex on slack |
@mairaw could you take a look? any more changes necessary or ready to go? |
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.
@dasMulli so sorry I dropped the ball on this one. I have a small suggestion. Let me know what you think before I merge this.
docs/core/tools/csproj.md
Outdated
@@ -37,7 +37,7 @@ Since `Microsoft.NETCore.App` or `NetStandard.Library` metapackages are implicit | |||
* If you need a specific version of the runtime when targeting .NET Core, you should use the `<RuntimeFrameworkVersion>` property in your project (for example, `1.0.4`) instead of referencing the metapackage. | |||
* This might happen if you are using [self-contained deployments](../deploying/index.md#self-contained-deployments-scd) and you need a specific patch version of 1.0.0 LTS runtime, for example. | |||
* If you need a specific version of the `NetStandard.Library` metapackage when targeting .NET Standard, you can use the `<NetStandardImplicitPackageVersion>` property and set the version you need. | |||
* Do not explicitly add or update references to either the `Microsoft.NETCore.App` or `NetStandard.Library` metapackage in .NET Framework projects. If any version of `NetStandard.Library` should really be needed when using a .NET Standard based NuGet package, NuGet will automatically install the needed version. | |||
* Don't explicitly add or update references to either the `Microsoft.NETCore.App` or `NetStandard.Library` metapackage in .NET Framework projects. If any version of `NetStandard.Library` is needed when using a .NET Standard-based NuGet package, NuGet automatically installs the needed version. |
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.
suggestion: install the needed version -> installs that version
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.
much better, changed 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.
Cool. I'll merge when build finishes. Thanks @dasMulli and apologies again on the delay. Feel free to ping me when I'm taking more than a few days to respond.
@dasMulli, |
@dasMulli, |
* mdoc CI update * link poiting to azure instead of paper (#3222) fixing link poiting to the actual pdf * Add missing parameter explanation. (#3003) * Add missing parameter explanation. * Add missing parameter explanation. * addressed feedback * csproj.md: Emphasise implicit version context (#3006) * csproj.md: Emphasise implicit version context Emphasises that `RuntimeFrameworkVersion` and `NetStandardImplicitPackageVersion` only apply to .NET Core and .NET Standard projects respectively. * Update recommendation on metapackages * Wording changes * Small wording change * Corrected typo in Standard Numeric Format Strings (#3219) * Fix typos in return.md (#3220) * Fix typos in return.md * Update return.md * Fixed a spelling mistake (#3228) 'true' -> 'false' in the example section * Update using-on-windows-full-solution.md (#3216) * fixed multiple typos in f# signatures chapter (#3231) * manually remove dups * fixed metadata values (#3226) * fix api links (#3209) * fix api links * fixed uids * use asp.net 4.x to mean non-core asp.net (#3230) * use asp.net 4.x to mean non-core asp.net * update link text * BUG 107525 Typo in WebRequest.Create topic (#3148) * BUG 107525 Typo in WebRequest.Create topic * Changing all "the .NET Framework" to ".NET" * Reverting the System.Obsolete strings * Fixing pre-existing build warning (broken link) * Fixing bad links * Fix frameworks in runtime store doc (#2949) * Removes `net47` directory. * Fixes the `dotnet store` example with valid arguments
Emphasises that
RuntimeFrameworkVersion
andNetStandardImplicitPackageVersion
only apply to .NET Core and .NET Standard projects respectively.Context: NuGet/Home#5809 - User expected
NetStandardImplicitPackageVersion
to work for a .NET Framework project.