Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of reference 'Copy Local' in ASP.NET Web Site project

Tags:

.net

asp.net

I don't see any exact duplicates in the Related Questions above, so here goes. Please don't stone me if it is a duplicate.

Is there any way to achieve the same end as setting 'Copy Local' to True on a web application reference? I could probably map a custom config section to the <compilation><assemblies> config section, and simple copy all assemblies to local, but that would be quite rude. Should I be looking at tapping into a build provider or something? I think the main issue here is identifying listed assemblies not normally present on the target platform, but this seems a very difficult task to me without simply using a hard-coded list, which will be out of date very quickly.

like image 710
ProfK Avatar asked Nov 25 '10 15:11

ProfK


People also ask

What is copy local in Visual Studio?

Copy Local essentially means I must manually deploy this DLL in order for my application to work.

What the copy website tool is used for asp net?

The Copy Web Site tool allows you to copy files between the current Web site and another site. You can run the tool by selecting Copy Web Site from the Website menu.

What is CopyLocal?

The CopyLocal property indicates whether this copy needs to be made. If the value is true , the reference is copied to the output path of the project at run time. If false , the reference is not copied.


1 Answers

Any non GAC referenced assembly would be copied into the bin folder of the web application and be deployed with it (if using the deploy functionality of visual studio).

Do you need something over and above this?


Update

You can't directly deploy GACed assemblies using a web application.

If these assemblies are not in the GAC on the deployment target, you will need to copy the relevant assemblies from the GAC into your application bin folder and ensure the references point to the copy in the bin folder.

like image 133
Oded Avatar answered Oct 05 '22 20:10

Oded