NU1101 Unable to find package DevExpress.ExpressApp.Persistent.Base. No packages exist with this id in source(s): - nuget-package

I am trying to set up packages for a WinForms XAF XPO Standard Security Application.
I used the wizard to create the solution.
Then the project updater
Then I edited the project file package references.
However when I try to build the .exe project I get
NU1101 Unable to find package DevExpress.ExpressApp.Persistent.Base. No packages exist with this id in source(s):
Even though the package shows in the references.
I tried checking the installed packages

For some reason DevExpress.ExpressApp.Persistent.Base was showing in Package Manager as installed in the Module.Win project.
I removed it and now I can build the solution.

Related

VS2022 not loading local nuget symbols

Created a class library locally, successfully packaged it, loaded it up in my project via nuget package manager, it works great.
I'm trying to debug from my project, and it's complaining that symbols do not exist for these files when trying to add a breakpoint.
The symbols package is being created: I have EfVueMantle.1.0.12.nupkg and EfVueMantle.1.0.12.snupkg both in the same directory. Changing the version number and repackaging creates both as expected, and I can update my project via nuget package manager.
I've tried uninstalling and reinstalling my package.
I've tried unloading and reloading the project.
I've tried opening and closing VS2022 at basically every step of this process.
I'm under the impression that installing the .nupkg will automatically discover the .snupkg file, but perhaps that is a misconception?
It is not supported yet.
For details see https://github.com/NuGet/Home/issues/8809

Package Manager for VS2012 does not display packages in local feed

I've created a simple package, only consisting of a couple of binaries in the
tools folder. The package is created with NuGet version 4.4.1.4656.
A local folder has been initialized with nuget init and contains said package. VS2017 Package Manager shows the package as expected, whereas VS2012 does not.
There are no available updates for the Package Manager in VS2012, which is at version 2.8.60318.667.
How do I get the feed to work with VS2012, so I can install the package in one of our older solutions? Is this a compatibilty issue?
Any pointers are welcome!

Nuget manager not visible

I am getting following error once i run the project in visual studio 2012.
Warning 1 Some NuGet packages were installed using a target framework
different from the current target framework and may need to be
reinstalled. Visit
http://docs.nuget.org/docs/workflows/reinstalling-packages for more
information. Packages affected: Microsoft.Web.Infrastructure,
SignalR.Hosting.AspNet, SignalR.Server
Reinstalling packages seem pretty straightforward. But, it can get very tricky since the following may affect or be affected by it:
Project retargeting or project upgrade where the target framework of the project gets changed Package dependencies and their versionsDependent packages and their versions.
I suggest you should read this document.
https://docs.nuget.org/consume/reinstalling-packages
read When to Reinstall Packages and What to Watch for section.

NuGet Package restore failed for project myProjectWeb: Unable to find version '3.0.1' of package 'AppForSharePoint16WebToolkit'

It's a provider hosted project. It used to work until very recently.
If I create a completely new project/solution, then it works.
If I start the old one, or redownload it from source control, I get the following error:
NuGet Package restore failed for project LocalTheaterWeb: Unable to find version '3.0.1' of package 'AppForSharePoint16WebToolkit'
I tried Update-Package -Reinstall but the problem stays.
Any ideas?
The solution of Scott Hillier did it for me:
http://www.shillier.com/archive/2014/08/05/nuget-package-restore-fails-for-sharepoint-2013-provider-hosted-apps.aspx
I often take advantage of the NuGet Package Restore capability to
reduce the size of my projects when saving or sharing them. Today, I
discovered an issue with this process when building SharePoint 2013
Provider-Hosted Apps against SharePoint Online. Here are the steps to
reproduce and the fix:
Create a Provider-Hosted App in Visual Studio 2013 using a SharePoint Online site for debugging.
Right click solution and "Enable NuGet Package Restore"
Save and Close Project
Delete the “packages” folder from project directory
Open Project in Visual Studio 2013
Rebuild, receive error “Unable to find AppForSharePoint16WebToolkit”
Open Packages.config file
Change “AppForSharePoint16WebToolkit” to “AppForSharePointWebToolkit”
Rebuild – successfully this time. Apparently, the "AppForSharePoint16WebToolkit" package is not available through the
NuGet Package Manager, but the older "AppForSharePointWebToolkit"
package is available.
The error message suggests that NuGet cannot find the AppForSharePoint16WebToolkit package in your package sources. So check the following:
The correct package source is selected whilst doing the Update-Package -Reinstall.
Check the package source that hosts the NuGet package is enabled. If you are using a recent version of NuGet the package restore should use all the enabled package sources.
See if the solution or project has its own NuGet.config which is overriding the package sources.
Without further information my guess is 3. since you say it works for a new project.
You can also run Fiddler to see what package sources NuGet is using as it tries to restore.
For older "locked down" projects with specific package version numbers that you can't update, un-check "Automatically check for missing packages during build in Visual Studio" which is found via:
Nuget Package Manager > Package Manager Settings
This means that if you toggle between newer projects and older projects you need to check and un-check this setting

How to manage own nuget package per project in the solution

We want to package some third party assemblies into our own nuget package. I created some packages with NuGet Package Explorer, and published it to our nuget server. I can also install it into our solution, however I have two problems:
Minor problem: when I install our nuget package a .nuget directory created with a packages.config in it. This contain a reference only to the package I added. We already have however several nuget packages installed into our solution. Every packages is in the packages subfolder in it's own subfolder, plus there's a repositories.config in the packages folder. The repositories config points to other packages.config, but not the one which is created by my actions into the .nuget folder. This is true even if I try to install the nuget package using the console into a specific project!
Major problem: When I look up the installed packages in the "Manage NuGet packages for the Solution...", I only see an "Uninstall" button for my package. I expect and want to have a Manage button, same what we have for the other nuget packages, which allows to check/uncheck the package per project in a treeview.
I use latest VS 2012, latest NuGet (2.2.xxx).
The problem was caused by incorrect package creation. When you create your package (with NuGet Package Explorer), on the right big "Package Contents" pane you want to create a lib folder by right click and selecting "Add Lib Folder" from the context menu. Then you want to add your assemblies into this folder instead of the root of the package content.
Having the right package structure helped achieving the expected behavior: no .nuget folder is created any more and I can "Manage" my package also.

Resources