Private NuGet server sometimes doesn't list packages - powershell

He Guys,
I'm hosting a private NuGet server at our office and push packages to it everytime we build our solution. But sometimes I get the following error when trying to download te newly pushed package to my local system:
Find-Package : No match was found for the specified search criteria and package name 'package-name-build-number'. Try Get-PackageSource to see all available registered package sources.
After I log into the server and browser on the file system of the nuget server (inside the ~/Packages folder), I see the package including the newly pushed version. Also when I visited the file system, suddently my local machine sees the package aswell.
Any ideas?
I'm hosting https://docs.nuget.org/ndocs/hosting-packages/nuget.server locally on a Windows 2012 R2 server using IIS. (.NET framework 4.6).
Tim

Related

Installing Discovery on Server with Information Server

I am trying to install Discovery on the same server as IIS which already has a DB2 instance. As the Discovery installation guide says, to install with an existing DB2 instance the repository database must be manually configured. It then goes on to say that this can be done using scripts which are found under the install directory. In other words, before I install I have to use something only available after installation.
Has anyone got a workaround - a link to somewhere I can get the scripts perhaps?
I managed to get it working by installing onto a clean VM and then copying the scripts from the installation folder and other files referenced in the scripts onto the IIS server and running from there. Had to search and replace the DB2 install directory within the scripts as they expect a default install of :\Program Files\IBM\SQLLIB whereas the IIS default install of DB2 is to \IBM\SQLLIB.

IBM Mobilefirst 8.0 Server installation issue on DEV enviroment

I'm installing IBM Mobilefirst 8.0 on DEV enviroment.
I followed steps available in IBM portal as below.
http://mobilefirstplatform.ibmcloud.com/tutorials/ru/foundation/8.0/installation-configuration/production/tutorials/command-line/
http://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/installation-configuration/production/
However i installed IBM Mobilefirst Installation Manager and WebSphere Liberty Core on DEV enviroment.
While installing MFP server we are getting below error:
./imcl install com.ibm.mobilefirst.foundation.server_8.0.0.20170911_1450 -repositories /data3/opt/IBM/MFP_Server/MobileFirst_Platform_Server/disk1 -properties user.appserver.selection2=none,user.database.selection2=none,user.database.preinstalled=false,user.licensed.by.tokens=false,user.use.ios.edition=false -acceptLicense
***********************************************************************
Before you start using the product, you must deploy a MobileFirst Server to your application server.
For more information about deploying projects with the Server Configuration Tool or command line tools, see
the documentation at https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/installation-configuration/production/appserver/.
***********************************************************************
ERROR: Failed to find required installation files.
CRIMA1161E ERROR: Failed to find required installation files.
Explanation: Installation Manager did not find required installation files from the repository. An issue has occurred with the package that cannot be resolved by Installation Manager.
User Action: If the repository files were transferred from a different location before the installation, verify that the files were not altered during the transfer operation. Copy the repository files to a different location and install from that location. If the repository files were not transferred note the package name and version number and contact customer support.
ERROR: 'zip com.ibm.imp.apacheant 1.9.4' not found in /data3/opt/IBM/MobileFirst_Platform_Server/disk1.
server details:
JAVA 1.7
Linux Redhat 6.8
Websphere Liberty core and IBM Installation Manager
ant 1.9.4
is there anything which i m missing?
As specified in the comments, the issue was possible corruption of the binary downloaded the first time - during download or transfer.
Downloading the same repository again and trying resolves the issue.

NuGet cannot restore AutoMapper 5.1.1 on TeamCity 10

With NuGet 3.3.0 we get the following error when restoring AutoMapper 5.1.1. Other packages restore successfully:
[11:49:53] [restore] Unable to find version '5.1.1' of package 'AutoMapper'.
[11:49:53] [restore] Process exited with code 1
There was an issue we had where we were unable to restore this package in Visual Studio 2013 on our dev machines unless we updated the NuGet package manager.
If we build the project in Visual Studio 2013 on the TeamCity server, the package restores successfully, leading us to believe that it's the NuGet version on the build agents that needs updating.
We tried to upload the NuGet.CommandLine.3.4.3.nupkg via the TeamCity | Tools menu, however TeamCity complains that it's not a valid NuGet package because it doesn't contain tools\NuGet.exe, even though it does!
We did manage to successfully upload Nuget.CommandLine.3.6.0-beta1.1839.nupkg, however that gives us a different error when the build step attempts to run.
So we're stuck. Has anyone out there had this issue and managed to resolve it?
Uploading NuGet.CommandLine.3.5.0-beta-final.nupkg to TeamCity (Administration => Tools => NuGet.exe => Add Version) and setting the NuGet build step to version 3.5.0-beta-final successfully resolved our issue.
I got the package from: https://dotnet.myget.org/feed/nuget-build/package/nuget/NuGet.CommandLine/3.5.0-beta-final

Why do I get InvalidDataException installing from local Nuget.Server?

So I installed a local NuGet server using the NuGet.Server package and VS2012. Everything seems to work fine, I have a package that I created based on a web application. The server knows about the package (i.e. I can list it using "nuget list"), but when I try to install it on the target machine, I get an InvalidDataException with a message the the Archive file cannot be size 0.
I am using Win7 x86 and the command-line nuget.exe utility from within PowerShell. Nuget.exe is in \windows.
Also, I can install packages from the public nuget.org server on this target machine.
In an interesting twist, I am able to install the very same internal package from the very same internal server when I run the same command from within the Package Manager Console in VS2012. I have verified that the nuget.exe versions are the same.
Any help on this?
Thanks,
Matthew
Turns out there was an issue with the local Nuget cache. Once I cleared it out, the package installed correctly.

Error "SolutionDir property not found in project" when installing SlowCheetah

I wanted to try out SlowCheetah so I:
Created a test web project (ASP.NET MVC 4 Web Application in Visual C#)
Enabled Package Restore by checking "Allow NuGet to download missing packages during build"
Installed SlowCheetah via Package Manager Console with Install-Package SlowCheetah.
Since I'd like this to work with a build server later on, I got a bit worried when this error message shows up:
SolutionDir property not found in project [TestWeb].
Have you enabled NuGet Package Restore? This is required for build server support.
You may need to enable it and to enable it and re-install this package
What does it mean and why can't it find SolutionDir?