So, I created a brand new ASP.Net MVC 4 application from Visual Studio. Much to my surprise, an "empty" project weighed in at 54Mb after pulling in and compiling all the packages. Obviously, I don't want to stick unnecessary things in source control, especially binaries.
因此,我从Visual Studio创建了一个全新的ASP.Net MVC 4应用程序。令我惊讶的是,在拉入并编译所有包装后,一个“空”项目的重量为54Mb。显然,我不想在源代码控制中添加不必要的东西,尤其是二进制文件。
I figured that the packages.config
file would control packages so that it would redownload them when missing and I could delete the packages
directory, but that didn't work. After deleting packages
, I get errors like : "BundleCollection
could not be found". I checked in the references of the project and there seems to be no problems resolving any of them. Where does this come from? I'm also missing apparently common namespaces like System.Web.Optimization
. I have a reference to it in my project and Visual Studio reports the reference is "resolved", but it points to the (deleted) package directory, which I assume is why it's erroring out.
我认为packages.config文件将控制包,以便在丢失时重新下载它们,我可以删除packages目录,但这不起作用。删除包后,我收到如下错误:“无法找到BundleCollection”。我检查了项目的参考资料,似乎没有解决任何问题的问题。这来自哪里?我也缺少像System.Web.Optimization这样的常见命名空间。我在我的项目中引用它并且Visual Studio报告引用是“已解决”,但它指向(已删除)包目录,我假设它是错误输出的原因。
What is the idiomatic method of putting an ASP.Net MVC 4 application in source control, especially with management of NuGet packages?
将ASP.Net MVC 4应用程序放在源代码控制中的惯用方法是什么,特别是管理NuGet包?
1 个解决方案
#1
4
This is a great article on using NuGet without adding the packages to source control. The article is for VS 2010, but I am doing the same thing in VS 2012
这是一篇关于使用NuGet而不将包添加到源代码控制的文章。这篇文章是针对VS 2010的,但我在VS 2012中也做了同样的事情
Using NuGet without adding packages to source control
使用NuGet而不向源代码控制添加包
#1
4
This is a great article on using NuGet without adding the packages to source control. The article is for VS 2010, but I am doing the same thing in VS 2012
这是一篇关于使用NuGet而不将包添加到源代码控制的文章。这篇文章是针对VS 2010的,但我在VS 2012中也做了同样的事情
Using NuGet without adding packages to source control
使用NuGet而不向源代码控制添加包