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

The SDK 'Microsoft.DotNet.Arcade.Sdk' specified could not be found. #2429

Open
Balkoth opened this issue May 15, 2024 · 12 comments
Open

The SDK 'Microsoft.DotNet.Arcade.Sdk' specified could not be found. #2429

Balkoth opened this issue May 15, 2024 · 12 comments

Comments

@Balkoth
Copy link

Balkoth commented May 15, 2024

Are there specific prerequisites needed to get these projects to load in Visual Studio? This does not mention anything special.

error : The SDK 'Microsoft.DotNet.Arcade.Sdk' specified could not be found. C:\Work\VisualStudioGitHub\command-line-api\Directory.Build.props

There are lots of questions around the web in regard to errors with 'Microsoft.DotNet.Arcade.Sdk' but no actual solution. So what am i missing?

@Bertk
Copy link

Bertk commented May 15, 2024

Hi,
Microsoft.Dotnet.Arcade.Sdk documentation is located at GitHub.

Arcade is intended to provide well-understood and consistent mechanisms for consuming, updating, and sharing infrastructure across the .NET Core team

https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.Sdk/overview/9.0.0-beta.24260.2

Please add additional nuget package sources in Nuget Package Manager.

https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json

@Balkoth
Copy link
Author

Balkoth commented May 15, 2024

This is what it looks like after double clicking System.CommandLine.sln from explorer, so it is already there:
image

@Bertk
Copy link

Bertk commented May 15, 2024

I created a fork and was able to build the solution with Visual Studio 2022 without errors.

image

I manually executed the build for the EndToEndTestApp dotnet build dotnet-suggest.Tests.csproj

image

Please check the .NET runtimes on your desktop. Maybe one is missing e.g. dotnet 5.0.17

{
  "tools": {
    "dotnet": "8.0.101",
    "runtimes": {
      "dotnet": [
        "5.0.17",
        "6.0.7",
        "7.0.9"
      ]
    }
  },
  "msbuild-sdks": {
    "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24170.6"
  }
}

@Balkoth
Copy link
Author

Balkoth commented May 15, 2024

No, this does not matter. What matters on my dev machine is when i start Visual Studio with an admin account. Then it suddenly can open those projects and does not show this error.

I am still clueless what is causing this problem.

@Bertk
Copy link

Bertk commented May 15, 2024

I always use local admin permission for development environment. Microsoft arcade tooling will install missing SDK.

C:\GitHub\command-line-api>build
GET https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1
  Attempting to install 'sdk v8.0.101' from public location.
...

Admin privileges are required for some dotnet commands.
https://learn.microsoft.com/en-us/dotnet/core/tools/elevated-access?tabs=windows

@Balkoth
Copy link
Author

Balkoth commented May 15, 2024

I am using the official contribution documentation, there is no such info to run Visual Studio as administrator.

And btw you are mixing running command line commands with Visual Studio. The original issue is that the projects on my machine do not load because of the error outlined in the op.

@jonsequitur
Copy link
Contributor

I believe there's a package missing from the preview feed. You can potentially bypass this by using a release version of the SDK, by setting an environment variable DisableArcade to 1.

@Balkoth
Copy link
Author

Balkoth commented May 15, 2024

Two things need to be done in order to successfully load and build the projects:

  • Set environment variable DisableArcade to 1
  • Delete NuGet.config from the root directory

@Bertk
Copy link

Bertk commented May 15, 2024

And btw you are mixing running command line commands with Visual Studio. The original issue is that the projects on my machine do not load because of the error outlined in the op.

The VS behavior is different from the shell scripts and the main usage for arcade is the CI based using shell scripts. The VS behavior is narrowed.

@Balkoth
Copy link
Author

Balkoth commented May 16, 2024

I believe we can agree that the goal should be:

  • Read and follow the steps in CONTRIBUTING.md
  • Be able to open and build the solution in Visual Studio

If it's not that way everyone's time trying to investigate this project is wasted with first trying to figure out how to get started...

@BenjaminMichaelis
Copy link
Contributor

We are interested in finding and solving any issues in the CONTRIBUTING.md file that there are and really want to. I attempted to reproduce the issue on a fresh machine, but I was unable to do so. This may point to a machine specific issue, that we want to identify and note in the CONTRIBUTING.md file as needed, so any more information you may have would be helpful..

@Balkoth
Copy link
Author

Balkoth commented May 22, 2024

Tell me what you need to know and i will try to provide this information.

The NuGet.config you provide does not play well with the NuGet-Feature "Package Source Mapping".
Adding the following to it lets me at least load the projects:

<packageSourceMapping>
  <packageSource key="dotnet-public">
    <package pattern="*" />
  </packageSource>
  <packageSource key="dotnet5">
    <package pattern="*" />
  </packageSource>
  <packageSource key="dotnet5-transport">
    <package pattern="*" />
  </packageSource>
  <packageSource key="dotnet-eng">
    <package pattern="*" />
  </packageSource>
  <packageSource key="dotnet-tools">
    <package pattern="*" />
  </packageSource>
  <packageSource key="dotnet-libraries">
    <package pattern="*" />
  </packageSource>
  <packageSource key="dotnet8">
    <package pattern="*" />
  </packageSource>
</packageSourceMapping>

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

No branches or pull requests

4 participants