Server can't find packages after upgrade - nuget-server

Private nuget server can't find packages after upgrade
I had to update the nuget server to get it to accept packages that were failing to upload (apparently the package format changed in dotnet core or something). Now all the previously uploaded packages aren't showing up in nuget. I can see all of them on the server just sitting there in their directories. But they can't be found. New packages are ending up in the server's package directory rather than their own directories.
From prior experience I don't think just copying the packages into the packages directory is going to work.
Trying to actually upgrade the NuGet.Server package from v2.8.6 to v3.0.2 appears to work but in the end the package is still at v2.8.6.

Don't try to upgrade nuget.server projects. That way lies madness.
Carry out the instructions like making a new one.
1) Create a new empty Web Project; target framework is NET Framework 4.6
2) Add NuGet.Server version 3.0.2
3) Fix duplicate <compilation> tag in web.config
4) Apply your API key to web.config and any other nuget configurations you have.
5) Remove old project from installation directory; leaving behind only the Packages directory and optionally any static files you uploaded to the installation directory itself (I keep a copy of nuget.exe and local project icons there).
6) Copy build output of new project to web installation directory.
It starts working. I don't know what's up with upgrading but it ends up with a smashed web.config and who knows what else.

Related

Installing NuGet package located in local package repository into a new Visual Studio Solution

UPDATE: Apparently providing too much pre-amble adds more confusion that clarity, so here's my question:
How do I add packages to a project from the local packages repository (i.e. not the central NuGet repository) when there are no references to them in the current solution and thus they do not show up as installed in the "Manage Package for Solutions" window.
Original with the background detail:
We use a local NuGet package folder that contains all the packages to be used by our projects. We do NOT want it to be arbitrarily updated or changed (i.e. no Installs of existing packages or restore's (if possible))
We've recently switched to VS2017 and are building our solutions and projects from scratch. We set up a NuGet.Config to point to the local packages folder. It works (as in we see new packages installed there if we test-install a package into a project from the NuGet central repository).
However, because the NuGet packages are currently not installed into any projects in the solution, NuGet reports (via Get-Package or the GUI) that there are no packages installed.
This seems to mean that we can't add the projects in the packages directory to the appropriate solutions without going to the central NuGet repository, despite their availability in the local package folder!
I'd prefer to see the package in the repository so that I can add them to their respective projects and have NuGet create the packages.config file for the project (using the new format).
Do I really have to re-install the packages from NuGet's central server just to add them to a project?
Installing from the central NuGet repository literally writes over the existing package in the local repository. More to the point, a few of our packages use versions that are no longer available on the NuGet repository.
Our current work-around is to editing the packages.config file by hand in one project in the solution, which makes the package visible in the "Manage Package for Solutions" window. We then can install the package in our actual target project by simply selecting the target project in the GUI (this performs the appropriate alterations on the target project's .csproj file). We then remove the hand-edited packages.config from the original project.
This is using NuGet 4.6 as installed by VS 2017.
Many thanks for any advice.
How do I add packages to a project from the local packages repository (i.e. not the central NuGet repository) when there are no references to them in the current solution and thus they do not show up as installed in the "Manage Package for Solutions" window.
Not sure if I completely understand your problem correctly, if not, please let me know for free.
To resolve this issue, you can create a local feed for those packages, so that you can see those packages in the Manage Package for Solutions and add them to their respective projects and have NuGet create the packages.config file for the project even if you don't have them installed.
Add those packages .nupkg into your local repository folder (Including those versions that are no longer available on the NuGet repository).
Head into Visual Studio and open the NuGet Settings dialog via Tools > NuGet Package Manager > Package Manager Settings. Click the Package Sources tab within the settings dialog, followed by the plus icon in the top left to add a new package source.
Enter the Name and Source of your local repository. The name can be any string and will be the name displayed in the NuGet Package Manager within Visual Studio.
Now that you have added the local package source, you will be able to use your local repository from within Visual Studio in the usual way, either via the Console or via the Package Dialog, by selecting it from the Package Source menu:
Hope this helps.

Leiningen cannot find SDK

I'm trying to install Leiningen from here https://djpowell.github.io/leiningen-win-installer/. But it cannot find SDK. If I check "Custom path" then it gives an out of range error on the next screen. Both Java and SDK are installed.
that installer automates these steps (from the project page)
The installer makes curl.exe available so that leiningen can download and upgrade files.
The installer downloads and installs the latest lein.bat from github.
lein.bat is added to your PATH variable.
LEIN_JAVA_CMD is set to point to your selected JDK, and the :java-cmd property is set in your user profile in profiles.clj.
lein self-install is run to install the Leiningen JAR file.
The uninstaller will remove the files that were installed, together with the Leiningen self-installs and search indexes; the environment variables that were set, and the additions to the PATH.
A likely area for this to do wrong is the setting of LEIN_JAVA_CMD and the :java-cmd key in the leiningen profile.clj file.
I'd first check:
the java path is correct in the value of the LEIN_JAVA_CMD environment vatiable
check the profiles.clj file in your home dirctory for conflicting JRE paths
uninstall that installer and do it by following the instructions at https://leiningen.org/
also note that Clojure only required the java runtime JRE and does not require or use the JDK. differing versions and paths between these has caused problems as well.

Nuget restore for some team members does not work - Microsoft.AspNet.Mvc and other core packages

I'm using Visual Studio 2015 community along with some other in our team. A mvc web application that I created works fine on my machine but when others get it to build, all packages download successfully but some of the core MVC such as Microsoft.AspNet.Mvc, Razor, etc don't install.
What was weird that on their machine, if they went into PM and downgraded the MVC package to 5.2.2 and then upgraded back to 5.2.3 it worked. But now when setting up the build on our build server, we get the same issue!
Any ideas why this bizarre behavior?
Didn't check that but why would that matter? When the Dev downgrades the version on 1 package and then upgrades back everything is as it should be
EDIT (4th Oct 2016) after investigating a bunch of things:
One of the developers at one point committed the "Packages" folder which sits at the root which had the "Microsoft.AspNet.Mvc" and other folders but without the dlls. This made the "Restore packages" not really "Restore" these as the folder already existed but when the build was run the artifacts weren't actually there in the folder to be moved into bin.
I deleted the packages folder, added it to gitignore and committed the change which made everything 'green'!

SublimeText 3 - Package Control: Removed directory for orphaned package ColdFusion

I am running SublimeText 3 (build 3083). I follow the manual install directions for the ColdFusion plugin as described here (https://github.com/SublimeText/ColdFusion):
Download Manually
Download the files using the GitHub .zip download option
Unzip the files and rename the folder to ColdFusion
Copy the folder to your Sublime Text 2 Packages directory
This has worked (and still works) on many machines. But today I have a PC that each time I re-open SublimeText it removes the ColdFusion directory and in the SublimeText console it says "Package Control: Removed directory for orphaned package ColdFusion". Haven't been able to find anything on this yet. Help appreciated. Thanks!
The "Download Manually" section is for Sublime Text 2 only. At the very top of the README you linked are the ST3 instructions:
The development branch contains a rewrite of the ColdFusion plugin. The only installation method is via Git.
cd Packages/
git clone https://github.com/SublimeText/ColdFusion.git
cd ColdFusion
git checkout development
On Windows machines, the Packages folder is in %APPDATA%\Sublime Text 3\Packages. You'll need to have a working copy of git on your machine, which can be obtained here.
Alternatively, you can download a zip file of the development branch, extract it, rename the resulting ColdFusion-development folder to ColdFusion, then copy that into your Packages folder.
EDIT
I did a little digging, and apparently this package is no longer being developed. However, the CFML package has been suggested as a replacement. Not being a ColdFusion user, I haven't tested it myself, but reviews from others are good. It's available for ST3 only, but can be installed directly via Package Control, so you don't have to worry about using git.
If you are using Sublime Text 3 ST3, the recommended package to use is the one named CFML available via Package Control here: https://packagecontrol.io/packages/CFML
If you are using Sublime Text 2 ST2, the recommended package is the one named Cold​Fusion available via Package Control here: https://packagecontrol.io/packages/ColdFusion
For both of them you'll find there installation instructions using Package Control or manually from GitHub.

Sitecore Package upload error

I am trying to install a Sitecore package from dev to staging environment, i have used package designer to create this package, but when i try to upload this package on the staging site it results in the following error:
The File exists.<br>
I have also tried uploading the package created using the Sitecore Rocks plugin which also results in the same error.
I am installing the package using installation wizard and uploading the package and i am not overwriting the existing files.
Kindly, help!
This error occurs if the windows temp has more than 65K files. When we cleared those files the issue got resolved.
Maybe there is package with the same name as your new package. Try to rename you package zip file and then upload.
make sure you are installing in the right environment
make sure the file doesnt not already exists (you can look it under the packages folder)
restart app pool and try again. Maybe overwrite the installation file.
there was a issue with sitecore on the staging environment(probably corrupted install). so we took a risk and installed it on live..! It works fine! Thank you all for the help. Much appreciated.