Azure Pipelines NuGet.config包无法还原

Azure Pipelines NuGet.config包无法还原,nuget,yaml,azure-pipelines,Nuget,Yaml,Azure Pipelines,嗨,我是Azure管道的新手 我正在尝试使用自定义Nuget配置构建一个Xamarin应用程序,但在使用restore命令时构建失败。 我得到以下错误: nuget命令失败,退出代码为(1),错误为(未能从远程源“BCrypt.Net PCL”检索有关“BCrypt.Net PCL”的信息(&semVerLevel=2.0.0)。输入不是有效的Base-64字符串,因为它包含非Base 64字符、两个以上的填充字符或填充字符中的非法字符 包“BCrypt.Net PCL”是一个NuGet包,但是

嗨,我是Azure管道的新手

我正在尝试使用自定义Nuget配置构建一个Xamarin应用程序,但在使用restore命令时构建失败。 我得到以下错误:

nuget命令失败,退出代码为(1),错误为(未能从远程源“BCrypt.Net PCL”检索有关“BCrypt.Net PCL”的信息(&semVerLevel=2.0.0)。输入不是有效的Base-64字符串,因为它包含非Base 64字符、两个以上的填充字符或填充字符中的非法字符

包“BCrypt.Net PCL”是一个NuGet包,但是restore命令正在“uxdrivers”源代码中查找它。 如果我在没有自定义NuGet.config的情况下运行,那么恢复可以找到所有的NuGet包,但显然它找不到none-NuGet源,因此构建也会失败

我尝试改变包源、凭据的顺序,并尝试使用不同的vmImage,但最终总是出现此错误。 请原谅我对此一无所知,因为我是YAML&Pipelines的新手

提前感谢您的帮助

请参见下面我的YAML:

- task: NuGetCommand@2
  inputs:
    command: 'restore'
    restoreSolution: '**/*.sln'
    feedsToUse: 'config'
    nugetConfigPath: 'NuGet.config'
请参见下面我的NuGet.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <clear />
 <packageSources>
  <add key="Grial" value="http://nuget.uxdivers.com/grial"/>
  <add key="Syncfusion_Xamarin" value="https://nuget.syncfusion.com/nuget_xamarin/nuget/getsyncfusionpackages/xamarin"/>
  <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
 </packageSources>
<packageSourceCredentials>
 <Syncfusion_Xamarin>
  <add key="Username" value="*MyUsername*" />
  <add key="Password" value="*MyPassword*" />
 </Syncfusion_Xamarin>
 <Grial>
  <add key="Username" value="*MyUsername*" />
  <add key="Password" value="*MyPassword*" />
 </Grial>
</packageSourceCredentials>

Azure Pipelines NuGet.config包无法还原

您在
Nuget.Config
文件中配置的方式似乎有语法错误

如果有加密密码,它将无法在其他计算机上工作,因为它是使用存储在您的开发人员计算机上的密钥进行编码的。您可以将其替换为明文密码,如:

<add key="Username" value="%USER_VARIABLE%" />
<add key="Password" value="%PASSWORD_VARIABLE%" />
查看文档以了解更多详细信息

希望这有帮助

<add key="Username" value="user" />
<add key="ClearTextPassword" value="xxxxxx" />