豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Improvements for nuget.exe install#1634

Merged
emgarten merged 1 commit intodevfrom
dev-emgarten-cmdInstall
Aug 12, 2017
Merged

Improvements for nuget.exe install#1634
emgarten merged 1 commit intodevfrom
dev-emgarten-cmdInstall

Conversation

@emgarten
Copy link
Copy Markdown
Member

@emgarten emgarten commented Aug 10, 2017

Improvements for nuget.exe install

  • Allow updating packages when -ExcludeVersion is used
  • Improved detection of already installed packages when -ExcludeVersion is used
  • Adding -Framework switch to allow setting the target framework used when resolving dependencies.
  • Remove NU1000 code from packages.config restore errors.
  • Avoid unneeded downloads when a version is not given and the package is cached.
  • Disable parallel for mono
  • Display errors and return a non-zero exit when install on packages.config fails
  • Remove old files during upgrades with -ExcludeVersion
  • Adding tests for nuget.exe install -ExcludeVersion scenarios and failure cases.
  • Improving current nuget.exe install tests to avoid packages getting shared through the global packages folder.
  • Removing old skipped install command tests that no longer apply
  • Re-enabling caching test for install

Fixes NuGet/Home#5743
Fixes NuGet/Home#5737
Fixes NuGet/Home#5736
Fixes NuGet/Home#5741
Fixes NuGet/Home#5017
Fixes NuGet/Home#3957
Fixes NuGet/Home#2405
Partial fix for NuGet/Home#3244

@mishra14
Copy link
Copy Markdown
Contributor

mishra14 commented Aug 10, 2017

@emgarten not so great if it doesn't build!! :P

@nkolev92
Copy link
Copy Markdown
Member

@mishra14 I assume that's why it's a WIP :P

@emgarten emgarten force-pushed the dev-emgarten-cmdInstall branch 2 times, most recently from e434394 to 6d5bed7 Compare August 11, 2017 06:49
@emgarten emgarten force-pushed the dev-emgarten-cmdInstall branch from 6d5bed7 to 406dc88 Compare August 11, 2017 07:30
@emgarten emgarten changed the title [WIP] the great nuget.exe install clean up Improvements for nuget.exe install Aug 11, 2017
@emgarten
Copy link
Copy Markdown
Member Author

Tests are passing on teamcity

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not await here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it returns the task and is awaited higher up

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

also returning the task

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If true the global packages folder will not be added as a source

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is "NoCache" also used in other place? why can't just use "NoCache" to exclude cache

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ExcludeCacheAsSource is a subset of NoCache

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

exist

Copy link
Copy Markdown
Contributor

@mishra14 mishra14 left a comment

Choose a reason for hiding this comment

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

how will people realize how ExcludeCacheAsSource work?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this seems a bit arbitrary. how will people realize what is the resolution logic?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discussed offline. This is fine as we set ExcludeCacheAsSource only if we see floating versions in the dependency list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: simplify these just as root and packagePathResolver

Copy link
Copy Markdown
Contributor

@mishra14 mishra14 left a comment

Choose a reason for hiding this comment

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

Discussed offline. Looks good

* Allow updating packages when -ExcludeVersion is used
* Improved detection of already installed packages when -ExcludeVersion is used
* Adding -Framework switch to allow setting the target framework used when resolving dependencies.
* Remove NU1000 code from packages.config restore errors.
* Avoid unneeded downloads when a version is not given and the package is cached.
* Disable parallel for mono
* Display errors and return a non-zero exit when install on packages.config fails
* Remove old files during upgrades with -ExcludeVersion

Fixes NuGet/Home#5743
Fixes NuGet/Home#5737
Fixes NuGet/Home#5736
Fixes NuGet/Home#5741
Fixes NuGet/Home#5017
Fixes NuGet/Home#3957
Fixes NuGet/Home#2405
@emgarten emgarten force-pushed the dev-emgarten-cmdInstall branch from 406dc88 to 8614255 Compare August 12, 2017 00:59
@emgarten emgarten merged commit 5b6edbb into dev Aug 12, 2017
@emgarten emgarten deleted the dev-emgarten-cmdInstall branch August 12, 2017 02:50
hickford added a commit to hickford/docs.microsoft.com-nuget that referenced this pull request Nov 3, 2017
NuGet/NuGet.Client#1634 introduced a Framework option for the install command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants