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

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.

Related

Vcpkg package(s) missing on this computer

hopefully someone can help me on this. I have cloned azure-iot-sdk-c from Github and attempting to compile the iothub_II_telemetry_sample but am getting this error:
Severity Code Description Project File Line Suppression State
Error This project references Vcpkg package(s) that are missing on this computer. For more information, see https://github.com/Azure/azure-iot-sdk-c/tree/master/doc/setting_up_vcpkg.md. The missing file is include\azureiot\iothub.h. D:\Azure\SDK\azure-iot-sdk-c\iothub_client\samples\iothub_ll_telemetry_sample\windows\iothub_ll_telemetry_sample.vcxproj D:\Azure\SDK\azure-iot-sdk-c\iothub_client\samples\iothub_ll_telemetry_sample\windows\iothub_ll_telemetry_sample.vcxproj 200
I have followed the link provided in the error and installed vcpkg but still get this error.
Azure IoT SDK uses many libraries (a few from Nuget packages and a few references such as MXchip etc) and you are using the C SDK of azure IoT sample on Windows, so to smooth installation of the required libraries you need vcpkg. Following is the link to install vcpkg, Once you install vcpkg, delete the Temp files and re-start your computer.
Install vcpkg manager on Windows

Teamcity Unmet Requirements: powershell_x86_Edition equals Desktop

I just updated my TeamCity server and I am suddenly getting this error message on my build agent.
I made a copy of the old installation, and the buildAgent.properties are the exact same. The Plugin folder for powershell exists aswell.
Does anyone have an idea on how to fix this?
I had the same problem when moved the build agent from windows to linux, and found the solution here.
In short:
Make sure powershell is installed on the server where the build agent is running.
You can set Platform and (Since TeamCity 2017.1) Edition properties at the PowerShell build step Edit page.
Edition: on windows Desktop, on linux Core
Platform: could be x64 or x86 based on installed version
If you set these properties correctly, it should meet the requirements, and you can use the build agent as before.

Private NuGet server sometimes doesn't list packages

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

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

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?