Repository navigation
Description
Describe the bug
JFrog CLI authentication does not appear to be available when MSBuild resolves Aspire.AppHost.Sdk from a private Artifactory NuGet feed. This was observed in CI, but the issue appears to concern JFrog CLI’s NuGet authentication and SDK resolution rather than a pipeline-specific behavior.
Current behavior
jf dotnet restore emits a warning that it cannot load the Artifactory service index, but does not fail. The subsequent build fails while resolving the Aspire SDK with HTTP 401:
<AppHost.csproj> : warning : Unable to load the service index for source
https://<artifactory-host>/artifactory/api/nuget/v3/<repository>/index.json
<AppHost.csproj> : error : Could not resolve SDK "Aspire.AppHost.Sdk".
<AppHost.csproj> : error : SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
<AppHost.csproj> : error : System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 401.)
<AppHost.csproj> : error : ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401.)
We currently have managed to resolve this by using a very verbose workaround, creating credentials for the nuget.config from git, which doesn't have credentials, just a source:
# Only needed if this job has not already run an OIDC-authenticated JFrog task.
- task: JfrogCliV2@1
displayName: Initialize JFrog OIDC variables
inputs:
jfrogPlatformConnection: 'JFrog Service Connection'
command: 'jf rt ping'
# Add these entries under the restore task's task-level env:
- task: JfrogCliV2@1
inputs:
jfrogPlatformConnection: 'JFrog Service Connection'
command: |
jf dotnet restore path/to/your.sln
env:
JFROG_RUN_NATIVE: 'true'
NuGetPackageSourceCredentials_Artifactory: 'Username=$(oidc_user);Password=$(oidc_token);ValidAuthenticationTypes=Basic'
Reproduction steps
- Have a machine with the dotnet 10 SDK installed, but not VS2026 or the Aspire CLI / SDK, to prevent it being resolved via other paths.
- Configure a NuGet source backed by a private Artifactory NuGet Remote repository.
- Authenticate with JFrog CLI using the environment’s normal authentication setup.
- Run
jf dotnet restore <solution.sln>for a solution containing an Aspire AppHost project. - Build the solution and observe the SDK resolution error.
Expected behavior
The authentication configured through JFrog CLI should allow the MSBuild SDK resolver to access the Artifactory NuGet source and resolve Aspire.AppHost.Sdk without a 401.
JFrog CLI version
2.129.0
Operating system type and version
Linux
JFrog Artifactory version
Latest SAAS version Artifactory/7.174.0 717400900
JFrog Xray version
Latest SAAS version
Activity
ocelik94 commentedon Nov 5, 2026
We got the same issue and can also replicate it. We need a fix for this as many projects are effected of this