nuget-package-restore

[A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast to… web.config issue

烈酒焚心 提交于 2019-11-28 15:11:26
问题 I am getting the following error: [A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast to [B]System.Web.WebPages.Razor.Configuration.HostSection. Type A originates from 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll'. Type B originates from 'System.Web.WebPages

How do I include NuGet packages in my solution for .Net Core projects?

血红的双手。 提交于 2019-11-28 08:13:12
问题 With classic .Net projects, if I added a reference to a NuGet package, it would get downloaded to a packages folder and I could check that into source control along with the rest of my code. This allowed any developer to download the code, along with the NuGet packages, without having to set up a package source to separately download the packages. This is not how .Net Core projects work. There does not seem to be a packages folder for the solution, and it is up to each developer to set up the

Enable NuGet Package Restore on Visual Studio 2013

我们两清 提交于 2019-11-28 07:18:00
问题 I'm following this easy tutorial to start coding with the Google+ API in C#. However, I've been stuck for hours on Step 3, where the first substeps are: In Visual Studio, click Project > Enable NuGet Package Restore > answer Yes in the dialog. Right-click on the gplus-quickstart-csharp project and select Manage NuGet Packages. Click Restore on the Manage NuGet Packages window. This will install the Google API Client libraries. When I click on Projet, there is no option "Enable NuGet Package

Assets file project.assets.json not found. Run a NuGet package restore

女生的网名这么多〃 提交于 2019-11-27 17:28:30
I'm trying to use nopCommerce(Which is written in .NET Core) but when I want to run the project I face 52 Errors telling me Run a nuget package restore Assets file ~\obj\project. assets.json' not found. Run a NuGet package restore to generate this file. Nop.Web.MVC.Testsote when I use the right click on the solution and selecting Restore Nuget Packages I get this message: All packages are already installed and there is nothing to restore. but those 52 Errors are still there and in Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution there is nothing installed on the solution

NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0

不想你离开。 提交于 2019-11-27 13:35:49
问题 I have such error in vs 2012: NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0 I see that it's a bug https://nuget.codeplex.com/workitem/3780 that was fixed for version 2.8 But I can't find the 2.8 version on https://nuget.codeplex.com Is it possible to fix the error without the installation of the 2.8 version? Or how to get the 2.8? 回答1: I fixed this by deleting the visual studio solution user options file (.suo)

Team Foundation Service build fails on NuGet package restore

此生再无相见时 提交于 2019-11-27 10:19:59
问题 I'm having kind of an odd problem with my Team Foundation Service build. I queue it up and it starts just fine, but then it fails with the following error: C:\a\src\Platform\Prod\Platform.Web\Platform.Web.csproj (436): The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568. So then I re-queue the build per the message/URL and...it happens again. I've Googled around but I can't

NuGet auto package restore does not work with MSBuild

风流意气都作罢 提交于 2019-11-27 06:38:57
I'm trying to build a solution with packages content missing (except repositories.config inside) with MSBuild 12.0. I expect it to auto restore all missing packages before building but this is not the case - MsBuild reports tons of errors: "are you missing a using directive or an assembly reference?" NuGet Manager is 2.7 (I see this in Visual Studio 2013 about box). I even tried to pass EnableNuGetPackageRestore=true parameter - no luck. What am I missing? UPDATED with latest official NuGet documentation as of v3.3.0 Package Restore Approaches NuGet offers three approaches to using package

How to get TFS2015 Build (Build.vnext) and NuGet package restore to use custom package sources

一笑奈何 提交于 2019-11-27 04:36:55
I'm trying to get our TFS2015 Build ( TFSBuild vnext ) going along with VS Team Services. Thus far most blogs and documentation has been helpful, except for when trying to build a project that uses custom package sources for NuGet automatic package restore. I've successfully deployed an a Team Services Build Agent (the new mechanism for builds) and all seemed to go well until the build task to Restore NuGet packages failed. The failure was due to custom/private package source not being picked up from the installed VS configuration, so those packages could not be found. The traditional packages

How to enable nugets package restore in Visual Studio 2015?

∥☆過路亽.° 提交于 2019-11-27 00:14:27
问题 How do I enable the nuget package restore feature in Visual Studio 2015? The feature is just missing in my context menu (Yes - I've double checked that I try it on the solution instead of a project) My only project is a .NET 4.5 console application - there is no .nuget folder yet. There is an actual nuget package installed. 回答1: I had the same problem as you and the way I solved it was to delete the packages folder from my solution and also bin and obj folders from every project in the

NuGet auto package restore does not work with MSBuild

妖精的绣舞 提交于 2019-11-26 12:55:07
问题 I\'m trying to build a solution with packages content missing (except repositories.config inside) with MSBuild 12.0. I expect it to auto restore all missing packages before building but this is not the case - MsBuild reports tons of errors: \"are you missing a using directive or an assembly reference?\" NuGet Manager is 2.7 (I see this in Visual Studio 2013 about box). I even tried to pass EnableNuGetPackageRestore=true parameter - no luck. What am I missing? 回答1: UPDATED with latest official