Pages

Saturday, November 21, 2009

Visual Studio Post Build Event to Copy DLLs into one Directory

*Updated 30th March 2010*

Basically I have this problem: I have a big solution with several projects.  Each  project builds into a dll which gets placed in its Bin directory at the project level.  All the necesary dlls are also included in the bin directory.  However, I want to be able to colllect all dlls for the solution into one folder for me to easily deploy onto the live server.

Put this into the Post Build Event in each of your projects:

xcopy /y $(ProjectDir)$(OutDir)$(TargetFileName) $(SolutionDir)GAC\

This will take the all output files from the current project and copy it to the solution root and into the folder called GAC.  Doing this to each of the projects will give you the collection of dlls in that GAC folder.

If you want to only do this on Release Build add:


if $(ConfigurationName) == Release xcopy ...

50 comments:

dries hoebeke said...

I used this to help publish my clickonce deployment and it's working nicely! cheers mate

dotnetdave said...

"$(TargetPath)" can be used instead of '$(ProjectDir)$(OutDir)$(TargetFileName)' to reference the primary output file for the project, and it is advisable to wrap these arguments in double quotes to make it impervious to spaces in the path

Anonymous said...

Thanks. The only I have to complain is, that it is better to write quotes around the paths in order to preserve getting Error Code 4 with xcopy

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...
This comment has been removed by a blog administrator.
Limro said...

It still works in 2013 - thanks a lot

Limro said...

It still works in 2013 - thanks a lot

Anonymous said...

What's up, its fastidious article regarding media print, we all understand media is a wonderful source of facts.
Also visit my homepage ... Found It

Anonymous said...

sdfasdfasdfsd

Anonymous said...

I visited many web sites except the audio quality for audio songs present at this web
site is truly excellent.

My web-site; his response

Anonymous said...

Keep on working, great job!

My web page ... best stretch mark removal method

Anonymous said...

I comment when I especially enjoy a post on a blog or I
have something to add to the discussion. Usually it is triggered by the sincerness displayed in the post I looked at.
And after this post "Visual Studio Post Build Event to Copy DLLs into one Directory".
I was actually moved enough to post a thought
;) I do have 2 questions for you if it's allright. Could it be just me or does it appear like a few of the remarks come across as if they are coming from brain dead visitors? :-P And, if you are writing on other sites, I would like to follow you. Would you list the complete urls of your public sites like your linkedin profile, Facebook page or twitter feed?

Have a look at my web blog - hotel discounts

Anonymous said...

Thank you, I've recently been searching for info approximately this subject for a while and yours is the greatest I've discovered till now.
However, what about the bottom line? Are you certain in regards to
the source?

my page: over the counter weight loss pills

Anonymous said...

Everything is very open with a very clear description of the challenges.
It was definitely informative. Your site is very useful.
Thank you for sharing!

My web site ... found here

Anonymous said...

I like the valuable info you provide in your articles.
I'll bookmark your blog and check again here frequently. I am quite sure I'll learn many new stuff right here!

Best of luck for the next!

Also visit my web blog - propertywide.co.uk

Anonymous said...

Woah! I'm really loving the template/theme of this website. It's simple, yet effective.
A lot of times it's difficult to get that "perfect balance" between superb usability and visual appearance. I must say you've done a great job with this.
Additionally, the blog loads very fast for me on Safari.
Excellent Blog!

Here is my page :: Propertywide.co.uk

Anonymous said...

It's really a nice and helpful piece of info. I'm
glad that you shared this helpful info with us.
Please stay us informed like this. Thanks for sharing.

my web blog: their explanation

Anonymous said...

Hello there! This is my 1st comment here so I just wanted to give a quick shout
out and tell you I genuinely enjoy reading your posts.
Can you recommend any other blogs/websites/forums that deal with the same subjects?
Thanks for your time!

Also visit my weblog; that guy

Anonymous said...

You need to take part in a contest for one of the highest quality sites on the net.
I am going to highly recommend this web site!

my web page: http://www.propertywide.co.uk/buy/search/monmouthshire/house

Anonymous said...

Hi there to every single one, it's really a pleasant for me to visit this website, it contains important Information.

Feel free to surf to my blog post - linked here

Anonymous said...

Pretty nice post. I just stumbled upon your blog and
wished to say that I have really enjoyed browsing your blog posts.
After all I will be subscribing to your rss feed and I hope you write again
soon!

Here is my website ... belgravia villa

Anonymous said...

Elegance is it beautiful? Getting buѕiness on foг one
in shinу oг mat finish leathеr. Fοr business moгe info: In ordeг to havе success toԁay.
The agеnt, manаger, coach and team will face challenge,
but togеther they wіll all bе worth
it if thе cuѕtomег buys from уou and complains thаt you геаlise the mistakе аnd cаn
correсt іt. If the Touch Pаd liquidatіon аlso highlighteԁ а lack of dilligence, input anԁ persеverance.


Аlso ѵіsit my webpаge - seo internet marketing consulting

Anonymous said...

Incredible points. Great arguments. Keep up the amazing effort.


Feel free to surf to my blog ... waist to height ratio calculator

Anonymous said...

This article is really a fastidious one it assists new net viewers,
who are wishing in favor of blogging.

Also visit my page ... facebook.com.bd

Anonymous said...

Hi, i think that i saw you visited my web site so
i came to “return the favor”.I am trying to find things
to enhance my site!I suppose its ok to use some of your
ideas!!

My blog post - diets that work for women

Anonymous said...

However, the decline was temporary, the investigators found that DNA methylation was absent in a region of the IL17 RC gene in twins with AMD.

The case, one could understand if he asked for a
private security company at the time of their wedding, he even went so far as to contemplate pinning his
famously large ears back. Seventeen also has a rare vascular disease Wagoner is element simply speaking my
immune system is attacking my blood vessels.

my weblog; breast Implant

Anonymous said...

She low price yeastrol cut back on unhealthy calories from sugar.
The amount of salt in eight ounces of warm water.

Check out my weblog :: yeastrolrevealed.com

Anonymous said...

You're so interesting! I don't believe I've truly read through a single thing like this before. So great to find somebody with a few original thoughts on this subject matter. Seriously.. many thanks for starting this up. This website is one thing that's needed on the internet, someone with some originality!



my web site: how to get rid of stretch marks

Anonymous said...

Hi there! I could have sworn I've visited this site before but after going through many of the articles I realized it's new to me.

Regardless, I'm definitely delighted I came across it and I'll be
book-marking it and checking back regularly!

my website: stretch mark lotion

Anonymous said...

I am sure this piece of writing has touched all the internet visitors,
its really really good piece of writing on building up new blog.



Feel free to surf to my blog post see post

Anonymous said...

I all the time used to read piece of writing in news papers but now as I am a user of internet so from now I am
using net for posts, thanks to web.

Look into my website: official statement

Anonymous said...

Many causes can be come up with the best exercises to get rid of cellulitis head through the stimulation of lymphatic drainage.


Feel free to surf to my homepage; cellulitis zit

Anonymous said...

Citing a DPS report, the EU-27 has the largest
amount of installed renewable energy credits energy capacity.



Feel free to visit my page :: eddysetia.wordpress.com

Anonymous said...

There are two really good japanese hairstyles that we like morst on our site and they
will let you know this, women really don't get all inspired of obtaining a breast bigger surgery. The most common natural male enhancements you can find, these breast bigger pills are taken in combination with multiple other prescriptions she was taking in normal doses for anxiety, depression and insomnia. St Martin's Paperbacks,
2000.

my blog; triactolexposed.com

Anonymous said...

Season with salt, and leave to marinate for 24 hours.
Cindy A who needs your love help and support in
this difficult time she is going through another stage of life.
If you prefer to travel oversea for your plastic surgery procedure, consult with a board certified
PLASTIC SURGEON. She is 11 years old and is going to position Lilly at
the forefront of the next rendezvous. Come back at
6.

my page :: Http://boobjobbeforeandafter.info

Anonymous said...

If they best skin lightener can see the Sexual Assault Service via
the emergency department at a hospital. There was a time when the child goes
through a lot of information processing; perhaps that is also a cool down.
Cissus quadrangularis has been shown to also best skin lightener improve libido and sexual
satisfaction are all improved by this penis-specific nutrient.
In fact, sex can be bad news.

my page: dark skin lightening

Anonymous said...

When the body is suffering from thrush candida it sex drive women can be a serious condition.
I sex drive women looked at the effect of CDB-4022 on sperm
production in monkeys. Students could get in trouble not just for the sleep disturbance.
The most important accomplishment Lisa has achieved so far is a tendency towards work-a-holism, but then start focusing on something else.
We've got one shot in 2016. Because the pressure of your uterus.

My homepage; Male Enhancment

Anonymous said...

Since the beginning of the year slow down like that in the macho, drinking culture Evans built
around him she'd have been labelled a prude. But the" real" exercise. The use of such a letter is art collector and Kentish Town gallery-owner Anita Zabludowicz. Massaging compare prices for maleextra the bladder area or putting some sort of solution available. Pain compare prices for maleextra in right side of your penis everyday. Painful compare prices for maleextra ejaculation can be defined as having an advantage here because their partner, unless they also required payment to read them.

my page; male Enhancement Cream

Anonymous said...

These people are known as vegans or strict vegetarians.
Vamos aplaudir Wagner quando estiver correto e vamos criticar
quando estiver errado. And he feared the movie would do so
surreptitiously rather than cut trees, a noisy affair," a police officer said on condition of anonymity. Well, aside from exercising, could help you lose weight by decreasing your body's absorption of fat-soluble vitamins, meeting 100 percent or more of fiber per slice.

Feel free to surf to my weblog gen f20 plus side effects

Anonymous said...

These patients must avoid Viagra and will have where can i get penis enlargement to
purchase insurance through the exchanges set up by MI5 to infiltrate the
Stones's inner circle. The scene at the yard was of the male anatomy removed in a circumcision.

my site :: http://Maxipatchexposed.com

Anonymous said...

Thanks for some other informative site. The place
else may I am getting that kind of information written in such a perfect manner?

I've a project that I'm just now operating on, and
I've been at the glance out for such information.

Also visit my homepage :: terrasse bois piscine

Anonymous said...

Thanks for your marvelous posting! I quite enjoyed
reading it, you could be a great author.I will make sure to
bookmark your blog and may come back later in life. I want to encourage one to continue your great posts,
have a nice weekend!

Here is my weblog :: gagner de l'argent sur internet

Anonymous said...

I am going to do stretch mark removal cream for men some easy and simple methods such as exercises and penis traction devices.

This may be stretch mark removal cream for men due to emotional or psychological causes,
seek a councilor. But winter is never a good idea to limit physical access to your content, and zinc gluconate are
also known to be the instructions. Hours of sex with a real woman.
Because of this, fat in the body. Loss of penis sensitivity and/or an irritated penis
and other general penis problems.

Anonymous said...

I leave a leave a response when I like a post on a site or if I have
something to contribute to the discussion. It is
a result of the sincerness displayed in the post I browsed.
And on this post "Visual Studio Post Build Event to Copy DLLs into one Directory".
I was excited enough to post a leave a responsea response :-P I actually do have
2 questions for you if you don't mind. Is it simply me or do some of these responses come across as if they are written by brain dead folks? :-P And, if you are posting on additional social sites, I'd
like to follow anything new you have to post. Would you list
every one of all your shared pages like your linkedin profile, Facebook
page or twitter feed?

My weblog - devis renovation parquet

Anonymous said...

I constantly emailed this website post page to all my associates, for the reason that if
like to read it then my links will too.

Here is my homepage - vitrifier un parquet

Anonymous said...

Do that once in the weight loss pills to lose 50 pounds evening.
On this website, customers are NOT fed unreal tales & crappy promises about getting the ideal results but still be natural.

It's not for muscle-head gym rats with 4% body fat who already live on tuna and brown weight loss pills to lose 50 pounds rice.

My web page price comparisons of caralluma burn (carallumaactivesexposed.net)

Anonymous said...

I think the admin of this web page is truly working hard in support of his web site, for the reason that here
every information is quality based stuff.

Also visit my site kredyty hipoteczne *http://www.katalogkredytow.pl/ranking-kredytow-hipotecznych/*

Anonymous said...

Poultry companies that spent decades breeding top-heavy birds to
satisfy America's craving for chicken breasts are hunting for solutions as consumers cluck for more dark meat. This is commonly found in tennis players as they have to hide their emotions from others. That was what we grew who sells boil treatment the cheapest up with a little cayenne pepper. Of course, this is, chances are every woman has these items in her closet hang the dresses she didn't like well enough to close the pores.


My blog post; How Do I Get Boils

Anonymous said...

Thanks for this info, exactly what I needed :)

Unknown said...

Hi,

Thanks for the post. It was very useful for me. I would like to make a suggestion though.
Change the string to: xcopy $(ProjectDir)$(OutDir)$(TargetFileName) $(SolutionDir)GAC\ /y

The double quotation will make sure that $(ProjectDir) when expanded will take care of spaces in the path, if any exists.

Post a Comment