You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use TeamCity NuGet feeds to restore packages in your builds: when the NuGet Installer or NuGet Publish build step is used, TeamCity will use the credentials provider to automatically authenticate requests to the private TeamCity NuGet feeds.
This appears to be literally true: the credentials provider is used automatically with NuGet Installer build steps. But if you instead have a VS or an MSBuild build step with Restore among the targets, the credentials provider does not appear to be used unless you explicitly add a "NuGet feed credentials" build feature to the project.
It would be useful to have the credentials provider applied automatically regardless of the choice of build step, or at least to have a global configuration parameter to enable this.
When I tried this by just adding the feed to NuGet.config and using the existing build configuration, the step
Runner type: Visual Studio (sln) (Microsoft Visual Studio solution (.sln) runner)
Execute: If all previous steps finished successfully
Solution file path: PROJECT.sln
Working directory: same as checkout directory
Visual Studio: Microsoft Visual Studio 2019
Targets: Restore,Rebuild,Android\PROJECT_FRONTEND:PackageForAndroid
Configuration: Release
Platform: default
Command line parameters: -verbosity:normal
failed with error message:
[RestoreTask] C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(124, 5): No se puede cargar el índice de servicio para el origen http://SERVER:8000/httpAuth/app/nuget/feed/PROJECT/FEED/v3/index.json.
El código de estado de la respuesta no indica un resultado correcto: 401 ().
I initially solved the problem by adding a "NuGet feed credentials" build feature for the listed feed, and then after re-reading the documentation I disabled the build feature and split the build step into one "Nuget Installer" step and the existing "Visual Studio (sln)" step without the Restore target. Both of these workarounds were successful.
pjt33
changed the title
Feature request: use credentials provider with VS / MSBuild build steps
Use credentials provider with VS / MSBuild build steps
Jun 4, 2020
https://www.jetbrains.com/help/teamcity/using-teamcity-as-nuget-feed.html says
This appears to be literally true: the credentials provider is used automatically with NuGet Installer build steps. But if you instead have a VS or an MSBuild build step with
Restore
among the targets, the credentials provider does not appear to be used unless you explicitly add a "NuGet feed credentials" build feature to the project.It would be useful to have the credentials provider applied automatically regardless of the choice of build step, or at least to have a global configuration parameter to enable this.
Cross-reference: JetBrains/teamcity-documentation#62
The text was updated successfully, but these errors were encountered: