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

csproj.md: Emphasise implicit version context #3006

Merged
merged 4 commits into from
Sep 26, 2017
Merged

csproj.md: Emphasise implicit version context #3006

merged 4 commits into from
Sep 26, 2017

Conversation

dasMulli
Copy link
Contributor

Emphasises that RuntimeFrameworkVersion and NetStandardImplicitPackageVersion only apply to .NET Core and .NET Standard projects respectively.

Context: NuGet/Home#5809 - User expected NetStandardImplicitPackageVersion to work for a .NET Framework project.

Emphasises that `RuntimeFrameworkVersion` and `NetStandardImplicitPackageVersion` only apply to .NET Core and .NET Standard projects respectively.
@dnfclas
Copy link

dnfclas commented Aug 27, 2017

@dasMulli,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

Copy link
Contributor

@mairaw mairaw left a 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.

@@ -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.
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

@mairaw mairaw requested a review from nguerrera August 28, 2017 18:26
* 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.
Copy link
Contributor Author

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.

Choose a reason for hiding this comment

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

@dasMulli
Copy link
Contributor Author

dasMulli commented Sep 1, 2017

Changed wording based on feedback from @guardrex on slack

@dasMulli
Copy link
Contributor Author

@mairaw could you take a look? any more changes necessary or ready to go?

Copy link
Contributor

@mairaw mairaw left a 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.

@@ -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.
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

much better, changed it

Copy link
Contributor

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.

@dnfclas
Copy link

dnfclas commented Sep 25, 2017

@dasMulli,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@dnfclas
Copy link

dnfclas commented Sep 26, 2017

@dasMulli,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@BillWagner BillWagner merged commit b037267 into dotnet:master Sep 26, 2017
BillWagner pushed a commit that referenced this pull request Sep 27, 2017
* 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
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.

5 participants