Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all 3198 articles
Browse latest View live

Couldn't Add NuGet Package

$
0
0

When I try to add the Plugin.FirebasePushNotification to my Xamarin.Android Project in Xamarin.Forms, I receive the following message, and the package isn't added. It seems to work fine on the iOS and Shared Projects, however. How would i fix this?

All packages and projects are compatible with MonoAndroid,Version=v11.0.Package restore failed. Rolling back package changes

Nuget Package issue

$
0
0
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>

I have tried automatic restore, I have also added these packages manually but nothing happens. I am using visual studio 2019, on MACOS Big Sur

Unable to find package NETStandard.Library

$
0
0

I tried to add a new Class library(.Net Standard) in Visual studio 2019. But I get this error message:

Unable to find package NETStandard.Library. No packages exist withthis id in source(s): Microsoft Visual Studio Offline Packages.

I haven't added any code to this file yet. When I go to NugetManager I can see this message:

NetStandard.Library not available at this source

Can anyone please help me with this issue?

Visual Studio - Nuget - Unable to load the service index for source

$
0
0

This is my NuGet.config :

<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /></packageSources><disabledPackageSources><add key="Microsoft and .NET" value="true" /></disabledPackageSources></configuration>

Now, in Visual Studio, when I try to install 'geckofx45' package, I get the following error :

install-package geckofx45 install-package : Unable to load the service index for source https://api.nuget.org/v3/index.json. At line:1 char:1+ install-package geckofx45+ ~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Do you have any solutions ?

Thank you in advance

PagedListPager customise paging links

$
0
0

I'm using the following package to do paging in ASP.NET MVC

https://github.com/TroyGoode/PagedList

This is wokring great, however I'd like to be able to add a extra HTML5 data attribute to the pager links. Simply which contains the page number of the link.

For example:

<a href="admin/demo/userlist" data-page-no="1">1</a> <a href="admin/demo/userlist" data-page-no="2">2</a> etc etc

But I'm struggling to do this and can only get the page number into the URL.

Can anyone help? I would have thought this would have been a common and useful feature.

Thanks

How to get a list of nuget packages to update in Visual Studio Code?

$
0
0

In Visual Studio Code, How can I get a list of nuget packages used in the solution, that have a newer version (equivalent to the Update tab in Visual Studio's package manager)?

I have NuGet Package Manager extension, but I can only add or delete packages with it (I think). How to simply list them, with the current version and the newest version in nuget? Then update all of them or one by one? It was so intuitive in VS:/

Nuget package installs but not listed in VS project references

$
0
0

Environment:

Microsoft Visual Studio Community 2019ASP.Net v4.8Web application project using VB (same problem 2 different projects)Nuget package Microsoft.Chart.Controls v 4.7.2046 (latest) "ASP.NET and Windows Forms Chart Controls for .NET Framework"

Problem:

The package installs without error. The folder and content appear in the packages folder. The entry is listed in packages.config...BUT the reference is not in the References list in VS solution explorer and attenpting to use any part of it causes a lot of html errors eg "Element Chart is not a known element".

Tried "Add Reference" but the package does not appear in any of the lists.

I'm wondering if this package is not intended for use in a web application?

ASP.NET framework MVC5 empty project NuGet Packages

$
0
0

I'm currently learning MVC5 and I'm stuck with NuGet packages. Actually I want to add some NuGet packages like bootstrap to visual studio 2019 community edition and use it for all projects and solutions but I don't know how to do this. Every time I create a new project I have to install the package again.Anyone help me please I want to install the package at once and not again and again.


Nuget Package for dependency property standard checking

$
0
0

The public dependency property standard must be validated in all.cs files in a project (WF, WPF, UWP and WinUI). For example, if a CustomControl.cs file contains a public dependency property, it should be named Header -> HeaderProperty (API Name + Property) if it is not named based on standard, a warning/message should be displayed when the project is compiled.

Below dp property doesn't follow above standard, So that the project need to throw a warning/error/message when it compiles.

    public static readonly DependencyProperty **OnHeaderProperty** = DependencyProperty.Register(nameof(Header), typeof(object), typeof(RibbonGroup), new PropertyMetadata(null));    public object **Header**    {        get { return (object)GetValue(OnHeaderProperty); }        set { SetValue(OnHeaderProperty, value); }

Any Nuget package available to achieve this requirement?

Azure Pipelines & Nuget Packages - Set pack version to tag version

$
0
0

I managed to have my pipeline triggered when I push a tag to the repo. The tag is always is the format "v(Major).(Minor).(Release)(-alpha)".

How can I get that information from the tag and set is as the package version?

EDIT 1:
The command git tag -a 1.0.1 will create the tag that will trigger the pipeline and I want the nugget package version to be "1.0.1" like the tag

dll.refresh files aren't added to bin folder

$
0
0

I have uploaded dll files as NuGet package on Azure Feed. I can install this package into my web application, and I can see the folder packages is created under the .solution.

There is no dll.refresh file in the bin, while there is a dll file. What is the reason?

I can't add a view for HomeController Action index

$
0
0

I can't add a view for HomeController Action index to control my database

I try to update (Package source) and (Microsoft Visual Studio Offline Packages) in nuget Manager like picture 2, but it's useless.

my HomeController code:

namespace Outfit_Web.Controllers{  public class HomeController : Controller  {    user_dbEntities db = new user_dbEntities();    public ActionResult Index()    {        var user = db.user_list.OrderBy(m => m.user_Id).ToList();        return View(user);    }    public ActionResult About()    {        ViewBag.Message = "Your application description page.";           return View();    }    public ActionResult Contact()           {        ViewBag.Message = "Your contact page.";        return View();    }  }}

How to get a list of Nuget packages used by multiple microservices

$
0
0

We have dozens of microservices and need to keep track of the list of Nuget packages used by each and update these packages at regular intervals for compliance. Is there a tool out there that could scan multiple solutions/projects and give us an overview of package installations?

NuGet Package restore failed

$
0
0

I am creating an 'ASP.NET Core MVC4' Demo project. When I am compiling it on another computer it outputs an error as follows:

Error 2 NuGet Package restore failed for project MVCDemo: Unable to find version '5.0.0' of package 'Microsoft.Data.Edm'..

What is the solution for this error?

How to get list of available versions for a specific package using nuget list for v3

$
0
0

I'm trying to use nuget list to get a list of available versions for a specific package through a nuget.org v3. But when i try to test in command line , i am facing below issue :

Example :nuget list JSON -Source "https://www.myget.org/F/adiaceplugins/api/v3/registration1/board.****/index.json"

Issue :Unable to load the service index for source https://www.myget.org/F/adiaceplugins/api/v3/registration1/board.****/index.json.The source does not have the 'version' property.

Kindly Suggest on this...


Differences between NuGet System.Windows.Forms.DataVisualization packages

$
0
0

I wanted to use Windows Forms charts in vs 2019 .NET 5.0. Therefore, I just checking the actual available charting package from NuGet. Using the Solution explorer "Manage NuGet Packages" it only shows in the browser "Maikebing.System.Windows.Forms.DataVisualization". As I understand the original Microsoft package is ""System.Windows.Forms.DataVisualization".What is the difference between "System.Windows.Forms.DataVisualization" "Maikebing.System.Windows.Forms.DataVisualization" ?

run powershell script after nuget package install

$
0
0

I have a very simple script in PowerShell My script runs well on .NET Framework Projects but It does not run on .NET Core 3.0 projects.

Is the method different?

This is my script

tools\install.ps1

$DTE.ItemOperations.Navigate("https://google.com")

and this is my package.nuspec file

<?xml version="1.0"?><package ><metadata>    ...<repository type="git" url="https://github.com/....." /><dependencies><group targetFramework=".NETFramework4.0"><dependency id="Microsoft.Windows.Shell" version="3.0.1" /></group><group targetFramework=".NETFramework4.5" /><group targetFramework=".NETFramework4.6.2" /><group targetFramework=".NETFramework4.7" /><group targetFramework=".NETFramework4.8" /><group targetFramework=".NETCoreApp3.0" /><group targetFramework=".NETCoreApp3.1" /></dependencies></metadata><files>   ...<file src="tools\install.ps1" target="tools\install.ps1" /></files></package>

"NAudio.Core.pdb not loaded"

$
0
0

This error keeps popping up every time I dispose of the WaveFileReader. I've tried reinstalling the NAudio from Nuget and it works fine the first time the program is built, but all subsequent builds break it.

I tried the suggestions from this post and set the debug info to "full," and looked into the .DLL files to see if the old versions weren't being replaced, but the error persisted.

In this post, a user suggested manually coding in the connection into the web.config file... but I couldn't find that file within my project. (_ _;;)

I also dug around in the project settings and checked the Generate NuGet package on build box within the Package tab. Now my code allows me to dispose audio one time per build, however if another audio file is imported and then disposed of, it crashes with the same error.

So, does anyone know what's going on and how to handle this?

Azure DevOps pipeline task NetCoreCLI pack. AutoVersion but keep Major.Minor.Patch unchanged

$
0
0

I have multiple NuGet packages in the same repository. I would like to AutoVersion my packages to $Major.$Minor.$Patch-CI-$DateTimeStamp. $Major.$Minor.$Patch-CI-$rev would also work.

If I know what the original version is, it will make the NuGet package easier to understand. I can also ensure that my dev NuGet packages are a higher version than my master NuGet packages. I don't want to manually set the Major, Minor, and Patch variables because there are multiple NuGet packages in the solution.

The following attempt always has Major.Minor.Patch as 1.0.0

- task: DotNetCoreCLI@2  condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))  inputs:    command: 'pack'    packagesToPack: $(projectsNuGet)    nobuild: true    versioningScheme: 'byPrereleaseNumber'

This doesn't change the version at all

- task: DotNetCoreCLI@2  displayName: DotNetCoreCLI pack !master  condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))  inputs:    command: 'pack'    packagesToPack: $(projectsNuGet)    nobuild: true    arguments: --version-suffix pre9999

Error occurred on restoring nuget package in visual studio "The path is not of a legal form"

$
0
0

Facing issue while restoring the nuget packages in visual studio and getting the following error, 'The path is not of a legal form'. Below are the configuration details.

Visual Studio 2019 - v16.5.4Nuget Package Manager - 5.5.0dotnet SDK - 3.1.201

Viewing all 3198 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>