nuget-package-restore

What are the advantages of using Nuget automatic package restore in the enterprise?

拥有回忆 提交于 2019-12-13 14:26:52
问题 I've been trying to implement a Nuget policy inside my company and I was wondering what is the real value of Automatic Package Restore when working on internal projects on a internally hosted TFS. I understand that in OpenSource projects or when using externally hosted source control not checking in external packages can save a lot of disk space, but apart from this advantage (saving disk space on the server) I cannot see any other advantage in using the automatic restore: actually it gives

NuGet package restore in builds and Visual Studio

佐手、 提交于 2019-12-13 03:40:52
问题 We have a number of VS2013 solutions, with the "Enable NuGet package restore" option selected. Remembering back, selecting this option creates a ".nuget" solution folder containing a number of files (NuGet.config, NuGet.exe, NuGet.targets). As a final step, I would edit the NuGet.targets file to add a package source for our in-house repo. I've just upgraded our old TFS2012 server to Azure DevOps 2019 and am currently creating new build pipelines to replace our old XAML-based build definitions

NuGet Package restore IS enabled but I get an error saying it's not enabled

无人久伴 提交于 2019-12-12 08:30:06
问题 I have nuget package restore enabled in my solution. However, when I try to build the project, I get this error: This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. Any ideas how to fix this problem? I have tried deleting my NuGet.targets and NuGet.exe file and re-enabling nugget package restore. It recreates the files and I get the same error. 回答1: Try and see if this helps: in solution explorer, right click on the

Visual Studio 2015 loses Nuget packages on new installations

三世轮回 提交于 2019-12-11 12:36:34
问题 I have a solution with various projects in it. The packages folder is in the solution root. Every time my solution is downloaded onto another PC from TFS, Visual Studio runs the package restore automatically, but then complains that the references to the packages are missing. All of them are where they should be in the packages folder. Is this a bug with Visual Studio 2015, or am I doing something wrong? EDIT: The package dll's are missing from the packages folder. Only the nuspec files are

ASP.NET 5 on VS 2015 - Can't build or debug solution

大憨熊 提交于 2019-12-11 12:03:46
问题 I'm developing an ASP.NET 5 MVC 6 solution. Unfortunately I can't remember what happened but I'm getting a strange issue where the IDE doesn't build solution. When I hit Ctrl + Shift + B the following line appears in the output console: 1>------ Build started: Project: <My project name>, Configuration: Debug Any CPU ------ but nothing actually happens, and I can't close solution until I'd press Ctrl + Break to cancel build. I'm however noticing a few strange things. The References section of

Could not resolve this reference: NuGet on CI server

瘦欲@ 提交于 2019-12-11 10:00:00
问题 I'm running a CI build on a TFS build controller, connected to VS Online. I've got a 'Could not resolve this reference' problem for a NuGet package and I've observed behavior that I haven't seen before: Locally the pacakage is downloaded to packages\FluentValidation.5.5.0 whereas on the server, it's downloaded to packages\FluentValidation.5.5.0.0 . Packages.config: <package id="FluentValidation" version="5.5.0" targetFramework="net45" userInstalled="true" /> .csproj file $(SolutionDir) for

How to run Nuget Package Manager Host in cmd / powershell

和自甴很熟 提交于 2019-12-11 08:28:50
问题 I am currently using Update-Package command in Visual Studio 2017 Nuget Package Manager Console. I need to use it from command prompt eg: nuget Update-Package Newtonsoft.Json 回答1: Visual Studio's Package Manager Console is only available in Visual Studio. The NuGet cmdlets interacts with Visual Studio itself to read/modify your project file, so that implementation can't work as-is in other powershell hosts. If your goal is just to script updates to packages, as long as you're not impacted by

NuGet restore Vs NuGet installer

房东的猫 提交于 2019-12-11 05:33:02
问题 I am using TFS 2015. I want to restore nuget packages on build. while defining my build definition, I find "NuGet restore" task with name NuGet restore. But, I find that "NuGet Installer" task with name NuGet restore is used in solutions provided by other people while I was researching at the ways to restore nuget package. I cannot find "NuGet Installer". is it available only in VSTS and not in TFS 2015? can anyone please tell me the difference? 回答1: By default the NuGet Installer task in TFS

AutoMapper package 5.1.1 is not found when Nuget restore on hosted build agent in Visual Studio Team Services

只愿长相守 提交于 2019-12-10 15:19:14
问题 Really weird problem with restoring AutoMapper on the hosted build agent in Team Services (previously VSO). It just fails with a Warning 'Unable to find version 5.1.1 of package AutoMapper'. We have a custom and private nuget repo so we've had to add a nuget.config to list all the sources but for some reason AutoMapper cannot be found! It works perfectly fine in Visual Studio IDE even after deleting the packages folder. To test out if it is the custom setting with nuget sources, I've created

How to fix `Your project does not reference “.NETFramework,Version=v4.6.1” framework…`

三世轮回 提交于 2019-12-10 15:14:12
问题 I got this error Your project does not reference ".NETFramework,Version=v4.6.1" framework. Add a reference to ".NETFramework,Version=v4.6.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore. after checkout a project from company repository and rebuild on my machine. When I try to install .Net461 (downloaded from here) they said .NET Framework 4.6.1 or a later update is already installed on this computer. This is all .NET framework versions on my machine