NuGet cannot restore AutoMapper 5.1.1 on TeamCity 10 - nuget

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

Related

I can't get Nuget push command to work on Visual Studio Online using latest Nuget tasks

I am using Visual Studio 2017 and Visual Studio Online. My team has recently switched to Asp.Net core 1.1 for our web development. Before we had a working nuget publishing process, but that doesn't work anymore because the old nuget tasks are deprecated.
I'm already aware that there should be Nuget package task before the push task, but that task has a known bug for .Net core. Instead I set up my project in VS so that the build task generates my .nupkg file.
Here is my setup from vs-online:
My setup for Nuget push task
The result looks like this:
The result when running.
I solved my problem myself.
I changed the path to:
**/*.nupkg;-:**/packages/**/*.nupkg;-:**/*.symbols.nupkg

NuGet Installation of EntityFramework

I have been doing some testing between VS2015 and VS2017. I created a .NetFrameworkApp and a .NetCoreApp website in both systems. I then installed a couple of packages in all four websites; in particular EntitytFramework. It installed in both VS2015 websites and the VS2017 .NetFrameworkApp website without problem but it wouldn't install in the VS2017 .NETCoreApp website. I got the following error messages.
net45 (.NETFramework,Version=v4.5)
One or more packages are incompatible with .NETCoreApp,Version=v1.1.
Package restore failed. Rolling back package changes for 'RLSBCWebSite_NC'.
Time Elapsed: 00:00:01.4470850
Error Package restore failed. Rolling back package changes for 'RLSBCWebSite_NC'. 0
Anyone any idea why that should be. I am assuming it should install otherwise how would you use CodeFirst etc.
The "EntityFramework" package is not supported with .NET Core App, use the:
Microsoft.EntityFrameworkCore.SqlServer
package instead

xunit nuget package restore failed

I've come to a problem while trying asp.net vNext beta8. I'm running a working project but I wanted to add a unit test project next to it. I've found that you should add the xunit and xunit.runner.dnx nuget packages in the project.json. while typing, the intellisense continuous me so I see that the package must be downloaded from nuget. after saving the project.json i get the error in my output, which says: An error occurred while sending the request.
Does anyone else get this problem or does anyone know the solution?
Thanks in advance :)
My problem appeared to be a corporate proxy which didn't like visual studio and the nuget package manager. when working on the guest network I was able to restore all the packages.

Visual Studio 2013 - Error occurred while trying to restore packages. The underlying connection was closed.

In Visual Studio 2013, NuGet package manager fails to restore packages. When clicking Manage NuGet Packages on the project, NuGet states "Some NuGet packages are missing from this solution. Click to restore from your online package sources.". After clicking "Restore", the following error appears...
Manage NuGet Packages Window
Error occurred while trying to restore packages. The underlying connection was closed.
If you build the project, the output window shows the following errors...
Build Output Window
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
NuGet Package restore failed for project MyProject: The underlying connection was closed: An unexpected error occurred on a send..
NuGet package restore failed.
Any ideas?
This turned out to be an issue with the CDN host that Microsoft was using didn't have SSL enabled. Trying to access the CDN URL for the RazorGenerator.MVC package was failing. If I changed the response returned to non-SSL via Fiddler it worked just fine.
It seems Microsoft just fixed their CDN issue - case closed.

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?