次の方法で共有


The new DLL Hell (aka as Nugget)

Today I was preparing a demo about Continuous Deployment to Azure from TFSService.

For that demo I created a basic ASP.Net MVC4 with the internet Template, and try to build & deploy from TFS Service.

Nothing "fancy" here, however when I start the first build I started to get Build Errors because some DLLs were not found. Some of the missing dependencies were:

  • System.Web.Optimization
  • WebMatrix.Data
  • NewtonSoft.Json

 

My first reaction was to check in the NuGET packages folder to see if I have had uploaded/checkin that binaries correctly, and here is were the nightmare starts.

How is it posible that some DLLs are referenced to the bin folder? Why there are different versions and assemblies for the same functionality? (like Microsoft.Web.Optimization vs System.Web.Optimization)

So to clean all of those errors I decided:

  1. Delete the packages folder contents, so the build server should download all the packages required at build time
  2. Manage all default dependencies from NuGet

It takes several Try & Fix Failed Builds, but finally I have the right list of dependencies for the default "internet template"

  • System.Web.Optimization -> Install-Package Microsoft.AspNet.Web.Optimization
  • DotNetOpenAuth -> Install-Package DotNetOpenAuth.AspNet
  • NewtonSoft -> Install-Package Newtonsoft.Json
  • EF -> Install-Package EntityFramework
  • WebGrease -> Install-Package WebGrease
  • WebMatrix _>Install-Package Microsoft.AspNet.WebPages.WebData

 

If you want to get my updated packages.config I have uploaded to my Gists

Comments

  • Anonymous
    July 01, 2013
    right click on the solution and activate/select "restore nuget packages" in case of missing packages folder.