Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
Перейти к файлу
Caio Granero 4a4823d8b9
Avoid reinstall tool already installed (#41746)
Fixes #40818

Context

Following the changes introduced in #37311, the dotnet tool install --global command began reinstalling tools that were already installed, which involved deleting and then adding the same tool version again. Before this release, it was not possible to install a version that was already installed.

This behavior change was reported in #40818. I propose a modification to avoid reinstalling tools that are already installed.

Change

The current installation flow involves uninstalling all matching tools and then installing them again. My change modifies this flow by first checking if the requested best match package version is already installed. If it is, the flow is stopped, and a message is printed: 'Tool '{0}' is already installed'.
2024-06-27 13:19:45 -07:00
.config [main] Update dependencies from dotnet/arcade-services (#40722) 2024-05-07 11:42:33 +00:00
.devcontainer
.github
build Made robocopy less noisy. 2024-06-10 14:53:10 -07:00
documentation Remove the old 2.0 links 2024-06-25 14:30:24 -07:00
eng [main] Update dependencies from dotnet/source-build-reference-packages (#41826) 2024-06-27 16:03:26 +00:00
scripts
src Avoid reinstall tool already installed (#41746) 2024-06-27 13:19:45 -07:00
template_feed Include templates in SDK layout 2024-05-07 09:57:37 +00:00
test Avoid reinstall tool already installed (#41746) 2024-06-27 13:19:45 -07:00
.editorconfig
.gitattributes
.gitignore
.sscignore
.vsts-ci.yml Update centos8 to centos9 2024-06-20 16:51:37 +02:00
.vsts-pr.yml Update centos8 to centos9 2024-06-20 16:51:37 +02:00
CODE-OF-CONDUCT.md
CODEOWNERS Add implementation of Aspire service (#41319) 2024-06-05 11:17:27 -07:00
Directory.Build.props Add implementation of Aspire service (#41319) 2024-06-05 11:17:27 -07:00
Directory.Build.targets
Directory.Packages.props More minima 2024-05-17 12:14:24 -07:00
LICENSE.TXT
NuGet.config [release/8.0.4xx] Update dependencies from dotnet/msbuild (#41575) 2024-06-13 14:34:20 +00:00
OverrideTest.targets
README.md Update build status information to be more accurate with current pipeline design. 2024-05-23 15:20:10 -07:00
SECURITY.md
THIRD-PARTY-NOTICES.TXT
TemplateEngine.slnf
build.cmd
build.sh
containers.slnf
exclusion.dic
global.json Update dependencies from https://github.com/dotnet/arcade build 20240626.1 2024-06-26 12:21:55 +00:00
restore.cmd Added -nativeToolsOnMachine to restore.cmd and test.cmd. 2024-05-28 15:32:40 -07:00
restore.sh
sdk.sln Add implementation of Aspire service (#41319) 2024-06-05 11:17:27 -07:00
source-build.slnf
test.cmd Added -nativeToolsOnMachine to restore.cmd and test.cmd. 2024-05-28 15:32:40 -07:00
test.sh
testAsset.props

README.md

Welcome to dotnet sdk

This repository contains core functionality needed to create .NET projects that are shared between Visual Studio and the .NET CLI.

See dotnet/project-system for the project system work that is specific to Visual Studio.

Common project and item templates are found in template_feed.

Build status

Visibility All jobs
Public Status
Microsoft Internal Status

Installing the SDK

You can download the .NET SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET SDK contains both the .NET runtime and CLI tools.

[!NOTE] When acquiring installers from the latest builds table, be aware that the installers are the latest bits. With development builds, internal NuGet feeds are necessary for some scenarios (for example, to acquire the runtime pack for self-contained apps). You can use the following NuGet.config to configure these feeds. See the following document Configuring NuGet behavior for more information on where to modify your NuGet.config to apply the changes.

For .NET 9 builds

<configuration>
  <packageSources>
    <add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
  </packageSources>
</configuration>

For .NET 8 builds

<configuration>
  <packageSources>
    <add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
  </packageSources>
</configuration>

Debian package dependencies

Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing the SDK from the .deb file (via dpkg or similar), then you'll need to install the corresponding dependencies first:

Looking for dotnet-install sources?

Sources for dotnet-install.sh and dotnet-install.ps1 are in the install-scripts repo.

How do I engage and contribute?

We welcome you to try things out, file issues, make feature requests and join us in design conversations. Be sure to check out our project documentation

This project has adopted the .NET Foundation Code of Conduct to clarify expected behavior in our community.

How do I build the SDK?

Start with the Developer Guide.

How do I test an SDK I have built?

To test your locally built SDK, run eng\dogfood.cmd after building. That script starts a new Powershell with the environment configured to redirect SDK resolution to your build.

From that shell your SDK is available in:

  • any Visual Studio instance launched via & devenv.exe
  • dotnet build
  • msbuild

How do I determine the timeline I must follow to get my changes in for a specific version of .NET?

Please see the Pull Request Timeline Guide.

How we triage and review PRs

With the SDK repository being the home for many different areas, we've started trying to label incoming issues for the area they are related to using Area- labels. Then we rely on the codeowners to manage and triages issues in their areas. Feel free to contact the owners listed in that file if you're not getting a response on a particular issue or PR. Please try to label new issues as that'll help us route them faster.

For issues related to the central SDK team, typically they are assigned out to a team member in the first half of each week. Then each member is asked to review and mark those needing further discussion as "needs team triage" and otherwise setting a milestone for the issue. Backlog means we will consider it in the future if there is more feedback. Discussion means we have asked for more information from the filer. All other milestones indicate our best estimate for when a fix will be targeted for noting that not all issues will get fixed. If you are not getting a quick response on an issue assigned to a team member, please ping them.

The example query used for triage of .NET SDK issues can be viewed here

For PRs, we assign a reviewer once a week on Wednesday, looking only at PRs that are green in the build. If you are contributing:

  • Get the PR green.
  • Include a test if possible.
  • Mention @dotnet-cli if you want to raise visibility of the PR.

License

The .NET SDK project uses the MIT license.

The LICENSE.txt and ThirdPartyNotices.txt in any downloaded archives are authoritative.