nuget

How to override nuget dependencies id in nuspec file

被刻印的时光 ゝ 提交于 2020-07-10 10:27:26
问题 I have projectA and projectB in the same solution. projectA creates its own package, but I override the package id by using a prefix: <PackageIdPrefix></PackageIdPrefix> <PackageId>$(PackageIdPrefix)$(MSBuildProjectName)</PackageId> The command to generate the package is : dotnet pack .\$(ProjectName).csproj --include-symbols --no-build -o C:\dev\UPP\Packages -p:PackageIdPrefix=MyPrefix." Therefore the generated package name is MyPrefix.ProjectA.nupkg projectB references projectA as a project

How to pass credentials when accessing a Nuget feed

拟墨画扇 提交于 2020-07-10 05:18:12
问题 I am trying to download packages from a Nuget repository which requires credentials for it to be accessed using NuGet.Core. I know that Nuget repositories with no authentication can be accessed as follows: //ID of the package to be looked up string packageID = "EntityFramework"; //Connect to the official package repository IPackageRepository repo = PackageRepositoryFactory.Default.CreateRepository("https://packages.nuget.org/api/v2"); //Initialize the package manager string path = <PATH_TO

How to pass credentials when accessing a Nuget feed

放肆的年华 提交于 2020-07-10 05:17:45
问题 I am trying to download packages from a Nuget repository which requires credentials for it to be accessed using NuGet.Core. I know that Nuget repositories with no authentication can be accessed as follows: //ID of the package to be looked up string packageID = "EntityFramework"; //Connect to the official package repository IPackageRepository repo = PackageRepositoryFactory.Default.CreateRepository("https://packages.nuget.org/api/v2"); //Initialize the package manager string path = <PATH_TO

How to pass credentials when accessing a Nuget feed

折月煮酒 提交于 2020-07-10 05:17:12
问题 I am trying to download packages from a Nuget repository which requires credentials for it to be accessed using NuGet.Core. I know that Nuget repositories with no authentication can be accessed as follows: //ID of the package to be looked up string packageID = "EntityFramework"; //Connect to the official package repository IPackageRepository repo = PackageRepositoryFactory.Default.CreateRepository("https://packages.nuget.org/api/v2"); //Initialize the package manager string path = <PATH_TO

What NuGet sources are used for restore?

℡╲_俬逩灬. 提交于 2020-07-09 19:07:44
问题 I'm doing a simple dotnet restore on my mac. I'm using the (for now) latest dotnet CLI version 2.2. Since you can have both a NuGet.Config file in your project folder and a machine-wide config, say: ~/projects/helloworld/.NuGet/NuGet.Config ~/.nuget/NuGet/NuGet.Config Is there any way to ask dotnet restore like "hey, if if were to run you, what combination of NuGet sources would you actually use?" As you might have guessed my problem is that i'm not really sure that all my defined sources are

What NuGet sources are used for restore?

拥有回忆 提交于 2020-07-09 19:06:49
问题 I'm doing a simple dotnet restore on my mac. I'm using the (for now) latest dotnet CLI version 2.2. Since you can have both a NuGet.Config file in your project folder and a machine-wide config, say: ~/projects/helloworld/.NuGet/NuGet.Config ~/.nuget/NuGet/NuGet.Config Is there any way to ask dotnet restore like "hey, if if were to run you, what combination of NuGet sources would you actually use?" As you might have guessed my problem is that i'm not really sure that all my defined sources are

What is the difference between the nuget packages hangfire.aspnetcore and hangfire and hangfire.core?

血红的双手。 提交于 2020-07-08 10:59:28
问题 What is the difference between the nuget packages HangFire.AspNetCore and HangFire and HangFire.core? It seems I am able to use hangfire with a ASP .NET MVC Core project with only the HangFire 1.6.21 package alone. See below packages used in my project: What is then the package HangFire.AspNetCore for? I am working with Visual Studio Code on Ubuntu, and I added the packages using : dotnet add package Hangfire dotnet add package Hangfire.AspNetCore 回答1: It's the usual naming convention for

Nuget package for just content files

旧时模样 提交于 2020-07-06 12:41:12
问题 I am trying to create a .NET standard nuget package of content files (with no managed assemblies), to be consumed by .NET Framework assemblies. My aim is to get this folder of files copied to the bin folder of the consuming assembly. This question is similar Add native files from NuGet package to project output directory (and uses this nuget package http://www.nuget.org/packages/Baseclass.Contrib.Nuget.Output/), but I require my nuget package to be .NET Standard I have added the files in the

Nuget package for just content files

可紊 提交于 2020-07-06 12:41:06
问题 I am trying to create a .NET standard nuget package of content files (with no managed assemblies), to be consumed by .NET Framework assemblies. My aim is to get this folder of files copied to the bin folder of the consuming assembly. This question is similar Add native files from NuGet package to project output directory (and uses this nuget package http://www.nuget.org/packages/Baseclass.Contrib.Nuget.Output/), but I require my nuget package to be .NET Standard I have added the files in the

Default package source for Nuget defaulting to newly added source and not All or nuget.org

。_饼干妹妹 提交于 2020-07-05 07:05:30
问题 I added a nuget 'Package source' to Visual Studio since we have an internal server at work. Visual Studio now always defaults to my internal server and cannot find most of our nuget packages until I switch the package source to All or nuget.org This is a minor inconvience, but for the past few weeks I have been doing many more clicks every time I need to work with the nuget package manager. Can anyone tell me how to default All instead of having it always default to Internal nuget ? 回答1: Can