NuGet Package restore for website
Asked Answered
L

2

5

I am trying to use NuGet Package Restore with VS2010 + Visual Sourcesafe. It is working partially for me. Where this is coming from: NuGet not getting missing packages

enter image description here

My Solution2 has asp.net website[Project1 in above image] that has another nuget package installed. Now another developer opens the Solution2 via VS2010, the automatic restore works for Library projects in Solution1. It gets all missing packages for Library projects that is referenced in this Solution2 and I see them in Solution1/packages folder.

But for Website it says external dlls i.e. pacakages missing. The issue I think is because website doesn't have a .csproj file and so it doesn't know things needs to be restored.(http://nuget.codeplex.com/workitem/1663)

Making it work partially:

  • Added packages/repositories.config to website solution (What is a solution folder in visual studio)

  • Another developer goes to VSS and get that packages folder manually. Now when he builds the solution, the Package Manager Console prompts for restore i.e. has "Restore" button. On clicking it will bring the AjaxControlToolkit.

Questions: - Is the above approach the only and best available for Websites?

  • When the developer clicks "Restore" button it brings packages for Library as well to Solution1/packages along with packages for nuget. Any reason why would it do that?

Any ideas on above issues?

Lebel answered 25/7, 2013 at 17:26 Comment(0)
L
1

For adding Solution level "packages" folder with repositories.config to VS Solution Explorer, I created a Solution folder and added repositories.config.

That created packages folder in the SourceSafe when I checked-in the solution.

I also found someone pointing the same thing here.

Update: I think the newer nuget is restoring the packages. But one other trick for nuget to add the dll to the bin folder it to check-in the .refresh files for AjaxControlToolkit and its dependent packages.

Lebel answered 25/7, 2013 at 23:17 Comment(0)
S
3

Per you link, nuget doesn't support websites. If you really need to use Nuget, and let's face it, everyone does, then in my opinion the best approach is to switch your website over to a web application, at which point visual studio will create a csproj file for you, detailing the nuget packages that are contained in the project. HTH

Sclerous answered 8/4, 2015 at 15:49 Comment(0)
L
1

For adding Solution level "packages" folder with repositories.config to VS Solution Explorer, I created a Solution folder and added repositories.config.

That created packages folder in the SourceSafe when I checked-in the solution.

I also found someone pointing the same thing here.

Update: I think the newer nuget is restoring the packages. But one other trick for nuget to add the dll to the bin folder it to check-in the .refresh files for AjaxControlToolkit and its dependent packages.

Lebel answered 25/7, 2013 at 23:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.