nuget-package-restore

VSTS NuGet restore fails (proxy?)

无人久伴 提交于 2019-12-10 14:55:46
问题 Up to now we've been using Azure VM's for building our application. Because of legal requirements we were instructed to move these activities to an on-prem server which resides behind a proxy. Now I see the builds are failing with the following log message: ##[error]getaddrinfo ENOTFOUND dist.nuget.org dist.nuget.org:443 So I am assuming this might be due to the nuget proxy config. So I've tried adding a nuget.config file with the correct proxy settings and checking that one in to the

Nuget Configuration in ASP.NET Core 1.0

旧城冷巷雨未停 提交于 2019-12-10 07:24:34
问题 In our existing solution we have a NuGet.Config file with the following content: <?xml version="1.0" encoding="utf-8"?> <configuration> <solution> <add key="disableSourceControlIntegration" value="true" /> </solution> <config> <add key="repositorypath" value="NuGetPackages" /> </config> </configuration> With this config we tell NuGet to store all packages in the "NuGetPackages" folder. This works fine for all our existing Projects (WebApi, Libraries, ...), but if I add a new ASP.NET Core

Jenkins - Run a NuGet package restore to generate this file

我的梦境 提交于 2019-12-10 02:28:48
问题 When I build .NET Standard 2.0 Library on Jenkins build server C:\Program Files\dotnet\sdk\2.1.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error : Assets file 'C:\Jenkins\workspace\<Project>\Sources\Library\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Jenkins\workspace\<Project>\Sources\Library\Library.csproj] I got an error above in build log. I searched about error and I found solution However, dotnet

NuGet Package restore failed for project PROJECT: Unable to find version 2.0.0 of package 'Microsoft.Net.Compilers'

試著忘記壹切 提交于 2019-12-10 02:11:48
问题 I used the GitHub extension of Visual Studio 2015 to clone my project onto a new computer. I try to restore packages and I get an error that says: NuGet Package restore failed for project PROJECT: Unable to find version 2.0.0 of package 'Microsoft.Net.Compilers' I've looked into some other questions about similar issues, but none of those solutions have worked for me yet. I tried deleting the packages folder, opening up up Visual Studios again and then rebuilding. That didn't resolve it. I

Error using nuget in VS2012 “missing packages”

痞子三分冷 提交于 2019-12-09 05:01:45
问题 When I build my project from within VS2012 I get the following error message This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. I have the nuget options set for NuGet to download missing packages. Yet I still get the error. I have nugget 2.7 installed. With VS2012 update 3 回答1: As Dan was alluding to, if your solution has a .nuget folder (from enabling package restore), then nuget 2.7's automatic package restore feature

VisualStudioOnline NuGet Restore now built in?

☆樱花仙子☆ 提交于 2019-12-08 02:53:32
问题 Is the Host Controller on Visual Studio Online now automatically restoring NuGet package before calling MSBuild? Previously I had to manually execute the following: nuget.exe restore MySolution.sln Now, when creating a new build in a new project, I noticed that I didn't need to do this. When looking at the build logs, I see this: 回答1: This was a change in TFS 2013 Update 2 and is reflected in VS, TFS, and VSO... 来源: https://stackoverflow.com/questions/30037083/visualstudioonline-nuget-restore

Nuget updates packages during build even when configured to not

落爺英雄遲暮 提交于 2019-12-08 02:45:49
问题 In tools->options->Nuget Package Manager->General I have configured nuget like this: [ ] Allow NuGet to download missing packages [ ] Automatically check for missing packages during build in Visual Studio When I build my project, I get messages like this: 33> Restoring NuGet packages... 33> To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. 33> All packages

NuGet package restore for solution fails (only on the command line)

馋奶兔 提交于 2019-12-07 08:37:01
问题 I've recently switched to NuGet's latest recommended method which is using a `packages.json' file for projects: { "dependencies": { "Newtonsoft.Json": "9.0.1", "RestSharpSigned": "105.2.3" }, "frameworks": { "net45": {} }, "runtimes": { "win": {} } } This works great in my local visual studio environment, but the CI server can no longer build the project. What's odd is that I can see the packages being successfully restored for the solution, but on build, MSBuild has no idea where those DLLs

nuget not downloaded packages under Visual Studio Team Services (visualstudio.com) (Automatic Package Restore)

百般思念 提交于 2019-12-07 02:10:50
问题 I am really going nuts here with nuget and building a solution under Visual Studio Team Services (visualstudio.com). Any help will be much appreciated. I have a solution containing 36 projects. Many projects use the same 5 or 6 nuget packages. I have carefully followed instructions for Migrating MSBuild-Integrated solutions to use Automatic Package Restore and therefore have a .nuget folder under my solution folder which contains a sole NuGet.Config file and no longer contains Nuget.exe or

Defaulting Package Management to PackageReference

一笑奈何 提交于 2019-12-06 07:29:19
问题 Is there any way in the Nuget.Config to default the Package Management option to "PackageReference"? I'm going to assume no since I didn't see it here but I thought I'd ask. I'm looking to default this on all developer machines for a certain repository and I was hoping I could change this in the Nuget.Config file that is stored in source control. This is what I'm talking about: 回答1: In Visual Studio 2017 you can define the settings in a NuGet.Config file. <configuration> <packageManagement>