Azure Devops не находит восстановленные пакеты nuget - PullRequest
0 голосов
/ 16 июня 2019

Я создал конвейер сборки для проекта C #.

Я ссылался на различные пакеты nuget, такие как Entity Framework и некоторые собственные пакеты, которые находятся в ленте.

Локально все решение создается и работает без проблем.

Также в конвейере сборки работает восстановление nuget. Но сборка не удалась, потому что она не может найти пакеты nuget.

Это происходит с общедоступными пакетами, такими как Entity Framework, а также с пакетами из моих ног.

Версия Nuget:

  • Обнаружена версия NuGet 4.1.0.2450 / 4.1.0

Я поигрался с версиями сборки, агентами сборки или создал свой собственный файл nuget.config.

Я также удалил пакет nuget, удалил все ссылки и переустановил каждый пакет

Например:

##[error]paybla.Repository.EntityFramework\RepositoryBase.cs(3,19): Error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
RepositoryBase.cs(3,19): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
##[error]paybla.Repository.EntityFramework\UnitOfWorkBase.cs(3,19): Error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
UnitOfWorkBase.cs(3,19): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
##[error]paybla.Repository.EntityFramework\UnitOfWorkBase.cs(4,19): Error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
UnitOfWorkBase.cs(4,19): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
##[error]paybla.Repository.EntityFramework\UnitOfWorkBase.cs(5,19): Error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
UnitOfWorkBase.cs(5,19): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
##[error]paybla.Repository.EntityFramework\UnitOfWorkBase.cs(6,19): Error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
UnitOfWorkBase.cs(6,19): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
##[error]paybla.Repository.EntityFramework\RepositoryBase.cs(11,26): Error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
RepositoryBase.cs(11,26): error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
##[error]paybla.Repository.EntityFramework\UnitOfWorkBase.cs(15,26): Error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
UnitOfWorkBase.cs(15,26): error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
##[error]paybla.Repository.EntityFramework\UnitOfWorkBase.cs(157,19): Error CS0246: The type or namespace name 'IDbSet<>' could not be found (are you missing a using directive or an assembly reference?)
UnitOfWorkBase.cs(157,19): error CS0246: The type or namespace name 'IDbSet<>' could not be found (are you missing a using directive or an assembly reference?) [d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj]
Done Building Project "d:\a\3\s\paybla.Repository.EntityFramework\paybla.Repository.EntityFramework.csproj" (default targets) -- FAILED.

1 Ответ

0 голосов
/ 17 июня 2019

Пожалуйста, попробуйте проверить, добавили ли вы папку \ packages в элемент управления исходным кодом, если да, вы можете удалить всю папку пакетов из элемента управления источником, чтобы проверить, работает ли она для устранения проблемы.

...