Error nu1101 unable to find package

error NU1101: Unable to find package — Azure DevOps (Private Nuget) #8132 Comments Environment VS version (if appropriate): 2017 or 2019 OS version : Hosted Ubuntu 1604 Environment: Azure Devops Build Pipeline Detailed repro steps so we can see the same problem Create a new ASP.NET Core Web Application Under Nuget Package Manager add […]

Содержание

  1. error NU1101: Unable to find package — Azure DevOps (Private Nuget) #8132
  2. Comments
  3. Environment
  4. Detailed repro steps so we can see the same problem
  5. Nuget restore details
  6. Error log
  7. error NU1101: Unable to find package Microsoft.NET.Sdk.Functions. #1345
  8. Comments
  9. Error nu1101 unable to find package
  10. Вопрос
  11. Все ответы
  12. Error nu1101 unable to find package
  13. Asked by:
  14. Question
  15. All replies
  16. error: NU1101: Unable to find package runtime.win-x86.Microsoft.DotNet.ILCompiler #630
  17. Comments

error NU1101: Unable to find package — Azure DevOps (Private Nuget) #8132

Environment

VS version (if appropriate): 2017 or 2019

OS version : Hosted Ubuntu 1604

Environment: Azure Devops Build Pipeline

Detailed repro steps so we can see the same problem

  1. Create a new ASP.NET Core Web Application
  2. Under Nuget Package Manager add a «Package Source» that point to my private source.
  3. Install the nuget package from your source.
  4. Add docker support to the project. (Rick click project, Add, Docker Support). Edit the Dockerfile.

`FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY . .
COPY *.csproj ./
COPY nuget.config /
RUN dotnet restore

COPY . .
WORKDIR «/src»
RUN dotnet build «TestPipeline.csproj» -c Release -o /app

FROM build AS publish
RUN dotnet publish «TestPipeline.csproj» -c Release -o /app

FROM base AS final
WORKDIR /app
COPY —from=publish /app .
ENTRYPOINT [«dotnet», «TestPipeline.dll»]`

  1. Upload to Azure git Repo.
  2. Create a Build pipeline with the following steps.
    6.1 Nuget Installer
    6.2 Nuget restore (This is successfull and restore packages. I added a Connect Feed for my Nuget package)
    6.3 Commandline task that does docker build -t testpipeline ./TestPipeline
  3. Queue a build

Nuget restore details

============================================================================== Task : NuGet Description : Restore, pack, or push NuGet packages, or run a NuGet command. Supports NuGet.org and authenticated feeds like Package Management and MyGet. Uses NuGet.exe and works with .NET Framework apps. For .NET Core and .NET Standard apps, use the .NET Core task. Version : 2.151.0 Author : Microsoft Corporation Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613747) ==============================================================================

`NuGet Config files used:
/home/vsts/work/1/Nuget/tempNuGet_264.config

Installed:
60 package(s) to /home/vsts/work/1/s/TestPipeline/TestPipeline.csproj
##[section]Finishing: NuGet restore`

Error log

Step 9/18 : RUN dotnet restore #»TestPipeline/TestPipeline.csproj» —> Running in 0843de55d156 /src/TestPipeline.csproj : error NU1101: Unable to find package Company.Connect.Shared.Logging. No packages exist with this id in source(s): nuget.org Restore failed in 1.5 sec for /src/TestPipeline.csproj. The command ‘/bin/sh -c dotnet restore #»TestPipeline/TestPipeline.csproj»‘ returned a non-zero code: 1 ##[error]Bash exited with code ‘1’. ##[section]Finishing: Build Docker Image

The text was updated successfully, but these errors were encountered:

From your error log, I see:

No packages exist with this id in source(s): nuget.org

which means that the nuget.config file that was copied into your docker image did not contain your private feed. When you use Azure DevOps to do a NuGet restore and tell it to use your private feed, it creates a temporary nuget.config file and uses that, as you can see in the other log:

NuGet Config files used:
/home/vsts/work/1/Nuget/tempNuGet_264.config

At the beginning of your repro steps, you said you added your private feed as a package source in Visual Studio, however, Visual Studio’s NuGet sources list edits your user profile’s nuget.config , which means those settings don’t apply to other users on the same computer or any other computer. It does apply to all solutions on your machine when run as your user account. You should manually create a nuget.config in your repo, either at the root or in the same directory as your .sln file and add your private source there if you want it to apply to all machines that clone your repo. However, if the nuget.config that is copied into the docker image doesn’t contain authentication information for the private feed (the temporary nuget.config file that Azure DevOps created), restoring within the image will likely fail with an unauthorized error.

There is already work planned to improve NuGet hierarchical config management in Visual Studio, but for now you need to do it manually. That won’t solve the authentication issues inside docker contains/images though.

Thanks, I will try manually creating the nuget.config. We are using a Linux container, but I found a solution for Windows containers. If I add a Visual Studio Build task before my Docker build task (Not doing a dotnet restore as part of the docker build task), it works

  • task: VSBuild@1
    displayName: ‘Build solution TestPipeline.sln’
    inputs:
    solution: TestPipeline.sln
    msbuildArchitecture: x64`

I have tried various ways of using a nuget.config file. I have a custom nuget step that populate the authorization credentials.

sources update -Name «ConnectFeed» -Username «vsts» -Password «$(System.AccessToken)» -StorePasswordInClearText -ConfigFile ./TestPipeline/nuget.config

Then step runs fine

But then on the RUN dotnet restore I still get the same error

Источник

error NU1101: Unable to find package Microsoft.NET.Sdk.Functions. #1345

Repro steps:
All done via Windows Powershell
Followed these instructions for installation for Azure Functions:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local

1.Initialise new Azure Function with command func init
2.Create new function with func new command
3. Select HttpTrigger option
4. Give it a name e.g. test

  1. open project in VS code (v. 1.35.1)
  2. press F5 to debug

I get the following error:
error NU1101: Unable to find package Microsoft.NET.Sdk.Functions. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages

Tried to restore by clicking on the popup stating
«There are unresolved dependencies. Please execute the restore command to continue»
I get this error.:
_ error NU1101: Unable to find package Microsoft.NET.Sdk.Functions. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages_

Action: azureFunctions.pickProcess
Error type: Error
Error Message: Failed to start debugging. Task «build» failed with exit code «1».

Version: 0.17.1
OS: win32
Product: Visual Studio Code
Product Version: 1.35.1
Language: en

The text was updated successfully, but these errors were encountered:

Источник

Error nu1101 unable to find package

Вопрос

Help me please to fix it.

«Severity Code Description Project File Line Suppression State
Error NU1101 Unable to find package System.Numerics.Vectors. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages SimpleApp D:DownloadXAMARINSimpleAppSimpleAppSimpleApp.csproj 1 »

Все ответы

Welcome to the MSDN forum.

This error usually shown the package cannot be found on any sources.

The solution 1: Examine the project’s dependencies in Visual Studio to be sure you’re using the correct package identifier and version number. Also check that the NuGet configuration identifies the package sources you are expected to be using.

The solution 2: In Visual Studio go to Tools -> NuGet Package Manager -> Package Manager Settings . Here select the Package Sources tab in the tree on the left. You should see the following:

Источник

Error nu1101 unable to find package

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

Help me please to fix it.

«Severity Code Description Project File Line Suppression State
Error NU1101 Unable to find package System.Numerics.Vectors. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages SimpleApp D:DownloadXAMARINSimpleAppSimpleAppSimpleApp.csproj 1 »

Welcome to the MSDN forum.

This error usually shown the package cannot be found on any sources.

The solution 1: Examine the project’s dependencies in Visual Studio to be sure you’re using the correct package identifier and version number. Also check that the NuGet configuration identifies the package sources you are expected to be using.

The solution 2: In Visual Studio go to Tools -> NuGet Package Manager -> Package Manager Settings . Here select the Package Sources tab in the tree on the left. You should see the following:

Источник

error: NU1101: Unable to find package runtime.win-x86.Microsoft.DotNet.ILCompiler #630

Hello,
I am trying to build x86 and x64 version of the sample library, but I am getting the Nuget error in the title because can’t find the relative package:
info : GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/fe324174-469a-4296-a9cb-1fd885bb6f2b/nuget/v3/flat2/runtime.win-x64.microsoft.dotnet.ilcompiler/6.0.0-preview.2.21103.1/runtime.win-x64.microsoft.dotnet.ilcompiler.6.0.0-preview.2.21103.1.nupkg info : NotFound https://api.nuget.org/v3-flatcontainer/runtime.win-x64.microsoft.dotnet.ilcompiler/index.json 515ms info : NotFound https://api.nuget.org/v3-flatcontainer/runtime.win-x86.microsoft.dotnet.ilcompiler/index.json 587ms info : NotFound https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/fe324174-469a-4296-a9cb-1fd885bb6f2b/nuget/v3/flat2/runtime.win-x86.microsoft.dotnet.ilcompiler/index.json 674ms info : OK https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/fe324174-469a-4296-a9cb-1fd885bb6f2b/nuget/v3/flat2/runtime.win-x64.microsoft.dotnet.ilcompiler/6.0.0-preview.2.21103.1/runtime.win-x64.microsoft.dotnet.ilcompiler.6.0.0-preview.2.21103.1.nupkg 1571ms info : Installing runtime.win-x64.Microsoft.DotNet.ILCompiler 6.0.0-preview.2.21103.1.
error: NU1101: Unable to find package runtime.win-x86.Microsoft.DotNet.ILCompiler. No packages exist with this id in source(s): dotnet-experimental, nuget

I followed the instructions in the readme, but I am not sure if they refer to old and obsolete source/packages:
nuget.config

dotnet add package Microsoft.DotNet.ILCompiler -v 6.0.0-*

I am also wondering if it is possible to do everything inside VS without being forced to open the shell just like happens with regular NuGet packages.
Thanks

The text was updated successfully, but these errors were encountered:

Источник

RRS feed

  • Remove From My Forums
  • Question

  • Help me please to fix it.

    Error:

    «Severity Code
    Description Project
    File Line
    Suppression State
    Error NU1101
    Unable to find package System.Numerics.Vectors. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
    SimpleApp D:DownloadXAMARINSimpleAppSimpleAppSimpleApp.csproj
    1 «

All replies

  • Hi Dan

    Welcome to the MSDN forum.

    This error usually shown the package cannot be found on any sources.

    The solution 1: Examine the project’s dependencies in Visual Studio to be sure you’re using the
    correct package identifier and version number. Also check that the

    NuGet configuration identifies the package sources you are expected to be using. 

    The solution 2:
    In Visual Studio go to Tools -> NuGet
    Package Manager
     -> Package Manager Settings. Here select the Package
    Sources
     tab in the tree on the left. You should see the following:

    If the nuget.org package source
    is missing, add it manually by clicking the green plus button in the top right corner and setting:

    • Name: nuget.org
    • Source: https://api.nuget.org/v3/index.json

    Sincerely

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by

      Wednesday, May 15, 2019 8:56 AM

    • Unproposed as answer by
      Jack Zhai-MSFTMicrosoft contingent staff
      Tuesday, May 21, 2019 6:55 AM
    • Proposed as answer by
      Jack Zhai-MSFTMicrosoft contingent staff
      Tuesday, May 21, 2019 6:55 AM

  • Hi Dan,

    Long time no hear you. Did you solve this issue or not?

    Have any update you would like to share us?

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

  • I had same issue. Solution 2 worked for me. Thanks

#asp.net-core #.net-core #nuget #nuget-package-restore #dotnet-cli

Вопрос:

Я опубликовал пакет NuGet (BuildingBlocks) для пакетов Github. Я использую файл nuget.config для указания источников nuget для моего проекта, а также учетных данных для моего пакета (учетные данные специально заменены заполнителями).:

 <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
    <add key="github" value="https://nuget.pkg.github.com/<username>/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <github>
      <add key="Username" value="<username>" />
      <add key="ClearTextPassword" value="<password>" />
    </github>
  </packageSourceCredentials>
</configuration>
 

Когда я запускаю восстановление dotnet локально на своей машине Fedora, это работает нормально. Но когда я пытаюсь восстановить пакеты в контейнере Docker, полученном из mcr.microsoft.com/dotnet/sdk образа, восстановление завершается со следующими ошибками:

   Determining projects to restore...
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.Annotations. No packages exist with this id in source(s): github, nuget
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.Localization. No packages exist with this id in source(s): github, nuget
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.IoC. No packages exist with this id in source(s): github, nuget
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.Nullability. No packages exist with this id in source(s): github, nuget
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.Domain. No packages exist with this id in source(s): github, nuget
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.Commands. No packages exist with this id in source(s): github, nuget
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.Option. No packages exist with this id in source(s): github, nuget
/app/src/DocumentService.Application/DocumentService.Application.csproj : error NU1101: Unable to find package BuildingBlocks.Queries. No packages exist with this id in source(s): github, nuget
 

В моем пакете BuildingBlocks нет пространства имен, такого как Аннотации и локализация, поэтому я не знаю, почему CLI dotnet записывает их в выходные данные. У кого-нибудь есть идеи о том, как это решить или почему это происходит?

Ответ №1:

добавьте следующие строки в свой файл Dockerfile

 COPY nuget.config .  
RUN dotnet restore --configfile nuget.config
 

Ответ №2:

Я предполагаю, что ваш пакет BuildingBlocks определен в ленте пакетов GitHub. Если это так, то это противоречит уже существующему пакету в https://www.nuget.org/packages/BuildingBlocks. К сожалению, NuGet не имеет детерминированного поведения при разрешении пакетов, и в файле NuGet.config указано несколько каналов. Причина фактических ошибок заключается в том, что пакет BuildingBlocks в nuget.org имеет зависимости от тех других пакетов, перечисленных в ошибках, которые не были опубликованы в nuget.org.

Самый простой способ решить эту проблему-переименовать пакет, чтобы он не конфликтовал с именем пакета, существующим в nuget.org.

Другой вариант-создать единый канал NuGet с вышестоящими источниками, которые позволят вам детерминированно управлять источником подачи пакетов. Я не знаю, можно ли это сделать в GitHub, но я знаю, что это можно сделать с помощью Azure DevOps: исходные источники.

Преимущества восходящих источников

Исходные источники позволяют управлять всеми зависимостями вашего продукта в одном канале. Мы рекомендуем публиковать все пакеты для данного продукта в ленте этого продукта и управлять его зависимостями от удаленных каналов в той же ленте через вышестоящие источники. Эта настройка имеет несколько преимуществ:

  • Простота: ваш файл NuGet.config, .npmrc или settings.xml содержит ровно один канал (ваш канал).
  • Детерминизм: ваш канал разрешает запросы пакетов по порядку, поэтому при перестроении одной и той же кодовой базы при одной и той же фиксации или наборе изменений используется один и тот же набор пакетов.
  • Происхождение: ваш канал знает происхождение пакетов, сохраненных в вышестоящих источниках, поэтому вы можете убедиться, что используете оригинальный пакет, а не пользовательскую или вредоносную копию, опубликованную в вашем канале.
  • Спокойствие: пакеты, используемые через вышестоящие источники, гарантированно сохраняются в ленте при первом использовании. Если вышестоящий источник отключен/удален, или удаленный канал выходит из строя или удаляет пакет, от которого вы зависите, вы можете продолжить разработку и сборку.

Комментарии:

1. Спасибо за ваш ответ. Я переименую пакет, так как в настоящее время я не использую Azure для своего проекта, но я добавлю ссылку в закладки для дальнейшего использования. Еще раз спасибо, что нашли время помочь.

0 / 0 / 0

Регистрация: 12.10.2019

Сообщений: 26

1

11.01.2022, 23:31. Показов 1239. Ответов 5


Всем привет, хочу использовать в своем консольном приложении (VS 2022, .NET Core 6) базу данных с помощью технологии ADO.NET. Нужно подключить System.Data.SqlClient или Microsoft.Data.SqlClient. Проблема в том, что их нету в Nuget пакетах.

Пытался подключить также через консоль .NET CLI — выдает ошибку:
error: NU1101: Unable to find package Microsoft.Data.SqlClient. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
error: Package ‘Microsoft.Data.SqlClient’ is incompatible with ‘all’ frameworks in project

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Эксперт .NET

6269 / 3897 / 1567

Регистрация: 09.05.2015

Сообщений: 9,188

11.01.2022, 23:40

2

Цитата
Сообщение от zEEmperon
Посмотреть сообщение

Проблема в том, что их нету в Nuget пакетах.

Есть они там… Проверьте источник пакетов, у вас с ним что-то явно не так

No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages



0



0 / 0 / 0

Регистрация: 12.10.2019

Сообщений: 26

11.01.2022, 23:44

 [ТС]

3

Someone007, Добавил фото во вложения, этих пакетов даже в корневой папке C:Program Files (x86)Microsoft SDKsNuGetPackages нету

Миниатюры

Нету SqlClient
 



0



Эксперт .NET

6269 / 3897 / 1567

Регистрация: 09.05.2015

Сообщений: 9,188

12.01.2022, 00:18

4

Лучший ответ Сообщение было отмечено zEEmperon как решение

Решение

Цитата
Сообщение от zEEmperon
Посмотреть сообщение

этих пакетов даже в корневой папке C:Program Files (x86)Microsoft SDKsNuGetPackages нету

С чего вы взяли что они там должны быть? Они с интернета скачиваются если источник пакетов нормально настроен.



0



0 / 0 / 0

Регистрация: 12.10.2019

Сообщений: 26

12.01.2022, 00:23

 [ТС]

5

Да, действительно, необходимо было добавить новый источник (Menu/Tools/NuGet Package Manager/Package Manager Settings/Options/Package Source)

Миниатюры

Нету SqlClient
 



0



Эксперт .NET

6269 / 3897 / 1567

Регистрация: 09.05.2015

Сообщений: 9,188

12.01.2022, 00:28

6

Цитата
Сообщение от zEEmperon
Посмотреть сообщение

необходимо было добавить новый источник

Вообще то он там есть по умолчанию. Если его не было, значит вы его зачем-то сами удалили.



0



IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

12.01.2022, 00:28

6

Понравилась статья? Поделить с друзьями:
  • Error no matching distribution found for torch
  • Error not supported between instances of nonetype and int
  • Error no matching distribution found for tensorflow
  • Error not support wireless lan in system
  • Error not set start date generation please call перевод