I have a WebSite project in VS2010. Folder structure is like:
../packages
../Website
../Website.DataAccess
etc.
I'm trying to open website by opening root folder in VS2010/Open Website. But when I do, it seems to have missing all the references, for example System.Web.Helper, System.Web.Mvc etc. Error messages like:
Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
keep showing up.
So why is there even this folder "packages"? Should it automatically let me open website project without worrying about all the references/assemblies?
Is there anything I should do to make the WebSite see the "packages" folder and use it, so I can build this WebSite?
EDIT 1:
Also, when trying to install new package from nuget console: install-package system.web.helpers
I get error message: The current environment doesn't have a solution open.
Since this is a WebSite, I don't have a Solution file. Anyway, seems a bit weird to me, that solution file is needed.
Package Folders Packages are special folders that can contain class folders, function, and class definition files, and other packages. The names of classes and functions are scoped to the package folder.
Yes, the . nuget folder is used as a cache for packages downloaded to speed up project restore and compilation. It can safely be removed.
Packages is where the nuget packages are fetched. No you do not ship to your IIS server. Actually there are a lot of files you don't copy. You should use visual studio to build a deployment folder, and only copy files from the deployment folder. Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM.
You may be talking about the NuGet packages folder which is created to store the links to the packages you have installed from the NuGet Package Manager.
Go to nuget.codeplex.com and click this button:
You need to install the NuGet
Visual Studio extension to begin with. You can get it directly within Visual Studio by going to Tools -> Extension Manager
and searching online for NuGet
- then installing it.
Once installed, you can manage the packages through it - right click on the project node in Solution Explorer
and select Manage NuGet Packages...
to get the UI.
Check out the answers on How do I get NuGet to install/update all the packages in the packages.config? for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With