Limit nuget packages to target version of solution
I have VS solution with approx 50 projects. The application runs in PROD environment and it targets framework NET 8.0. I regularly check for nugets updates to keep my app up-to-date and without...
View ArticleHow to auto-publish my GitHub branch on NuGet?
I have a GitHub repo that I'd like to automatically compile and publish to NuGet when a commit is pushed. How do I do it?
View ArticleHow to match app.config version numbers to packages.config
I've had this several times now with different packages (Latest was System.ValueTuple) installed using the nuget package manager in Visual Studio.After doing some upgrading of various packages I find...
View ArticleHow to find the version of a NuGet package that supports a specified .NET...
Lets assume my project based on .NET Framework 4.0 and requires the NuGet package GuardClauses.Currently GuardClauses' latest version is 5.0.0, which supports .NET Framework 4.6.1 and higher. So...
View ArticleNuGet package targets - how to copy files to subfolder of target dir on build?
I'm trying to add two text files to my nuget package so that when the user of the package builds the project, one file is copied to the root of the build directory, but another file is copied to a...
View ArticleMissing NuGet Packages, But "Packages Already Installed"
I have seen this same problem brought up by numerous people online, and have tried just about everything under the sun to resolve this issue but nothing is working. I copied my visual studio solution...
View ArticleUnable to find fallback package folder "NuGet & VS2019" Error
How to resolve this issue? VS2019Just created a new .Net Core 3.1 Windows Application and built the ProjectI was not able to follow this answer here! it is not clearSeverity Code Description Project...
View ArticleHow to mark a NuGet package as deprecated in a local repository?
I´ve seen that there is a way to mark packages as deprecated on nuget.org.Unfortunally I don't push my packages to nuget.org but to an internal file repository.Is there a way to mark a local package as...
View Article'ServiceCollection' exists in both nuget packages
I do have multiple projects in one solutions. Some of them are in .net core 2.1, 3.1 and 5.0. My main project is in .net core 5.0 and it have multiple projects as dependency (.net core 2.1,3.1). The...
View ArticleThe located assembly's manifest definition does not match the assembly...
I created a nuget package library called FeatureLibrary.I added this nuget package in a another project. At run time getting below error."Description": "Unhandled exception in BaseApiController....
View ArticleBuild error during publishing in MS Visual Studio Professional 2019
I'm getting build error as mentioned below while publishing web project to root directory. Anybody facing same issue?Publish has encountered an error.Build failed. Check the Output window for more...
View ArticleCreate Nuget package for C++/C Visual Studio Solution projects
I have several legacy components written in C/C++ and would like to wrap them into the Nuget package and use this package from C# code.What is the best way to actually wrap C++ code in nuget package? I...
View ArticleNuGet install-package error (unable to find version that is compatible)
I'm trying to install Xamarin.Forms package, however, the console throws this errorInstall-Package : Unable to find a version of 'Xamarin.Android.Support.Design' that is compatible with...
View ArticleCould not load file or assembly ‘Microsoft.IdentityModel.Abstractions,...
I am developing a C# dll based on .NET framework 4.8.2 which will use Microsoft Graph API to send email through outlook.For this I have added the latest Nuget packages for “Microsoft.Graph” v5.67.0 and...
View ArticleNuget how can i specify packages location?
i have simple folder structure:project1|_ nuget.config|_ packages.configproject2|_ nuget.config|_ packages.configpackages|_ FluentNHibernate.1.2.0.712|_ FluentValidation.3.2.0.0i need to restore...
View ArticleWhat is the EnsureNuGetPackageBuildImports target?
In some of my csproj files I have this but some dont:<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"><PropertyGroup><ErrorText>This project references...
View ArticleHow to find NuGet packages referenced in code but not in project
I have a C# .NET 6 project where I need to find all NuGet packages that are referenced by the C# source but are not directly referenced in the project file. This can happen when the package is a...
View ArticleVisual Studio insists downloading source files from GIT Repo for local...
SetupWe have internal NuGet packages consumed in other solutions, that we would like to package and debug locally in those other solutions, before we push both the code changes to Git and NuGet package...
View ArticleUpdate default nuget packages
I understand how to update a package within a solution but my question is how do you update the default packages. IE: When I create a new solution it's at the latest version already instead of having...
View ArticleCan't install nuget package in VS 2022
When I am going to install a nuget package in Visual Studio Pro 2022 (17.5.4), it shows the following error:Error NU1102Unable to find package Microsoft.NETCore.Platforms with version (>=...
View ArticleWhile installing VS template from a private nuget source, it is giving error...
C:\Users\pradeep.tyagi>dotnet new install GM.MicroService.Template::1.1.2482The following template packages will be installed:GM.MicroService.Template::1.1.2482Warning:...
View ArticleCannot install Plugin.Firebase.CloudMessaging in .NET MAUI project (Path Too...
I'm trying to integrate Firebase Cloud Messaging (FCM) into my .NET MAUI app, but I keep running into an issue when installing the Plugin.Firebase.CloudMessaging package via NuGet.Issue:When attempting...
View Articleoverwrite nuget packages in feed on visual studio team services
while usingnuget.exe push \\share\Packages\*.nupkg -Source "https://myvsts.pkgs.visualstudio.com/_packaging/tcpcm/nuget/v3/index.json" -ApiKey VSTSi got an Response status code does not indicate...
View ArticleReSharper "Remove Unused References" feature does not remove references added...
How do I get ReSharper’s "Remove Unused References" feature to work on references added through NuGet packages?Hi Everyone. I am using Visual Studio 2015 to work on a multi-project solution in C#. I...
View ArticlePrevent duplicating files in NuGet content and contentFiles folders
My NuGet package needs to deliver some rather large files to build output directory.In an old NuGet model, such files have to be stored in content folder of the .nupkg. While in a new model introduced...
View ArticleError about a file not being there even when its there under the bin folder
I have an ASP.Net website (not ASP.Net application) with the target framework set to .Net Framework 4.8. I recently updated the packages using Nuget. Now, when I Start without Debugging in VS 2022 then...
View ArticleVisual Studio: NU1008 Central Package Management problem
All of a sudden my solution which is 3 or 4 years old...is throwing errors. I was never using this feature. My solution has 10 projects in it, and I had made no code changes, visual studio updates, no...
View ArticleCould not load file or assembly Microsoft.Data.SqlClient, Version=5.0.0.0
Facing following issue after deploying app to azure app service:Unhandled exception. System.IO.FileNotFoundException: Could not loadfile or assembly 'Microsoft.Data.SqlClient,...
View ArticleUnable to find NuGet packages from local repo associated to virtual repo in...
I'm unable to find NuGet packages originally deployed to a local repository in JFrog Artifactory from a virtual repository. The local repo is bound/associated to the virtual repo.For the local repo, a...
View ArticleC# and VB: How to enable specific version dependency for a project auto...
Recently, I've worked on upgrading all of the projects in our main application to SDK style projects. This was done in order to enable the feature to auto generate a NuGet package for each project on...
View Article