The SDK 'Microsoft.DotNet.Arcade.Sdk' specified could not be found.
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?
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
This is what it looks like after double clicking System.CommandLine.sln from explorer, so it is already there:
I created a fork and was able to build the solution with Visual Studio 2022 without errors.
I manually executed the build for the EndToEndTestApp dotnet build dotnet-suggest.Tests.csproj
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"
}
}
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.
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
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.
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.
Two things need to be done in order to successfully load and build the projects:
- Set environment variable
DisableArcadeto1 - Delete
NuGet.configfrom the root directory
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.
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...
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..
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>
@Balkoth , for me also worked this:
<packageSourceMapping>
<clear/>
</packageSourceMapping>
Seems no one is interested to fix this for non Microsoft employees which may have this setup by default to work for them. I posted my workaround above. Closing.
For those who would like the resolve this issue without any changes to the repo. Removing the package source mappings as shown in the image below also works
Be carefull, you mess up your environment when you clear this in Visual Studio.