Deployment of new web applications has been a bit annoying since the birth of ASP.NET MVC. Production servers with .NET 4 or 3.5 installed will still be missing key assemblies such as System.Web.Mvc.dll. This will cause errors such as "Could not load file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies" and "Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies." when your project is deployed to production.
It is confusing for two reasons: Why does it work on your development machine? Well, when you install all the tools required to make MVC application you get all the necessary assemblies with it. Which assemblies are your production servers missing? Well there were 3 in ASP.NET 1, 1 in ASP.NET MVC 2 but now with ASP.NET MVC 3 + Razor there are loads. I've found out which ones I actually need before but it is still confusing.
With Visual Studio 2010 SP1 there is a new feature that does all the hard work for you. You can right click your ASP.NET MVC web application project and select 'Add Deployable Dependencies...':
Then you select the type of features you are using so Visual Studio can decide which references are needed:
It will then create a _bin_deployableAssemblies directory for you with all the assemblies included:
Now if you publish using Web Deploy it will include those files as expected and your deployed solution will be happy once more.
Important note:
If you are not using the 'Web Deploy' as your publish method though - this will NOT work. You will need to reference the assemblies and make them bin deployable yourself.
Get Good At Flash Games With This Advice!
7 years ago
Thank you! This little bit of info: If you are not using the 'Web Deploy' as your publish method though - this will NOT work. You will need to reference the assemblies and make them bin deployable yourself. Saved me tons of head ache.
ReplyDeleteThank you, thank you, ...
ReplyDeleteFYI...the WebMatrix assemblies break your app when using Windows authentication.
ReplyDeleteInteresting. Thanks for the info
DeleteThis comment has been removed by the author.
DeleteI guess that's why I suddenly had to add some appSettings to my Web.config for my forms authentication to work:
Delete<add key="enableSimpleMembership" value="false"/>
<add key="autoFormsAuthentication" value="false"/>
Any thoughts on "bin deploying" in 2012? I understand "Add Deployable Dependencies" is not available in vs2012.
ReplyDeleteLatest sports news headlines from India and world. Check out today's most recent & up-to-date news coverage, videos & photos at thesportsrumour.com
ReplyDeletesports news
Motifz Designer Lawn. 1, 2 & 3 Piece Unstitched Premium Embroidered Lawn 2019, Premium embroidered Lawn, Premium lawn, Premium lawn 2019, Motifz, Premium lawn in Pakistan. Shipping worldwide. Stitching option available.
ReplyDeleteInteresting post. I Have Been wondering about this issue. so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks Boiler repairs in Bracknell
ReplyDeleteYou have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. Plumber in Basinsgtoke
ReplyDeleteNice post. If you don't mind can I ask you something? May I upload my jsp project to AWS? With Oracle Database? If you have some time please let me know at Essay Writing Service
ReplyDelete
ReplyDeleteنقل عفش
نقل عفش من الرياض الى مصر شركة شحن من الرياض الى مصرمن الباب للباب
Buy online wholesale printed candle boxes and packaging at easy prices and shipping worldwide, with 24/7 customer support. Get a free custom quote now!!
ReplyDeleteBuy online wholesale printed custom lipstick boxes and packaging at easy prices and shipping worldwide, with 24/7 customer support. Get a free custom quote now!!
ReplyDeleteBlackbird packaging provide you with any size, shape design, custom cookie boxes wholesale sooner than any other packaging competitor in the market
ReplyDeleteHello, This is a Nituroy.com very interesting blog. this content is written very well This is an amazing
ReplyDeletepost, keep blogging.thanks for sharing.
Assamese call girls in guwahati
College escorts in guwahati
Housewife escorts in Guwahati
Nepali escorts in Guwahati
High profile escorts in Guwahati
Escort services in Guwahati
Independent escorts in Guwahati
You can book call girl in Guwahati or escort Service in Guwahati for incall facility or
ReplyDeleteoutcall Facility as and when required.To book Guwahati call girls you
can visit the following links
Guwahati Escort
Escort Services in Guwahati
Maybe you are also looking for the right person to ensure the higher quality
ReplyDeletesex and that’s why you are in this place because here we are going to share
the data and information of Guwahati Escorts.
Escort services in Guwahati
Call Girl services in Guwahati
Blackbird packaging company can provide you with any size, shape design, and cookie boxes wholesale sooner than any other packaging competitor in the market
ReplyDeleteExplore the profiles of guwahati escorts, guwahati call girls, call girls in guwahati and
ReplyDeleteescorts in guwahati for female companionship in top rated hotels.
Female Escorts in Guwahati
Independent Escorts in Guwahati
Blackbird packaging provide you with any size, shape design, custom vape boxes sooner than any other packaging competitor in the market
ReplyDeleteBlackbird packaging provide you with any size, shape design, custom vape boxes sooner than any other packaging competitor in the market
ReplyDeletePackaging town is a one stop solution for the short-run tuck top mailer boxes needs and supplies. At affordable prices. Request a free quote now.
ReplyDeleteBlackbird packaging provide you with any size, shape design, cbd bath bombs wholesale sooner than any other packaging competitor in the market
ReplyDeleteYour article is fascinating. , you have enriched your craft delightfully. It rouses individuals a ton. In the event that the subject is acceptable, at that point it is likewise enjoyable to peruse and this is the thing that individuals need these days, your post is truly intriguing. Enlivened by you, I also figure I ought to compose an article on a great subject.
ReplyDeletecall girls in gurugram
call girls MG Road
call girls in Noida
Manesar Escort Service
Golf Course Road Call Girls
Gurugram Escorts
Bhiwadi Escorts
Escorts in Sector 16
Noida Call Girls
call girl gurugram
Gurugram Escorts
escort service gurugram
Buy tracksuits for women online from ndure at easy prices delivered at your doorstep. Get free shipping
ReplyDeleteBuy best t shirts for men online from Dshred at best prices delivered at your doorstep. Get free shipping
ReplyDeleteBuy toys online in Pakistan from Al-Fatah at best prices delivered at your doorstep. Get free shipping.
ReplyDeleteI want to always read your blogs. I love them Are you also searching for Accounting Homework Help? we are the best solution for you. Contact us today and get the best. +1-(951)-468-9855 info@cheapassignmentwriters.com
ReplyDeleteExcellent. Good blog. Keep sharing. I love them Are you also searching for order assignment online? we are the best solution for you. We are best known for delivering book review writing services to students without having to break the bank
ReplyDeleteWonderful blog… You provided very interesting information here. I feel happy to read this post. I hope that you will write many posts like this… Thanks for sharing and Keep updating…..
ReplyDeleteRegards,
Online Thesis Help