Open
Description
New issue checklist
- I searched for existing GitHub issues
- I read pipeline troubleshooting guide
- I checked how to collect logs
Task name
DotNetCoreCLI
Task version
V2
Issue Description
Hi,
There's a problem with dotnet restore
task using config
and authenticated feed. The generated Nuget.config removes any nuget protocol versions specified.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="Artifactory" value="..." protocolVersion="3" />
</packageSources>
</configuration>
Will be rewrited without protocolVersion :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="Artifactory" value="..." />
</packageSources>
</configuration>
This is problematic with feeds that uses the same URL for v2 and v3, and mirrors feeds that supports only v3 (telerik for example).
Workaround :
- First use task NugetAuthenticate to authenticate to the feed and generate the Nuget.config keeping the protocol version.
- Use dotnet restore without credentials
Environment type (Please select at least one enviroment where you face this issue)
- Self-Hosted
- Microsoft Hosted
- VMSS Pool
- Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows and Ubuntu
Relevant log output
N/A
Full task logs with system.debug enabled
N/A