Windows Develop Bookmark and Share   
 index > Windows Forms General > Assembly References and Deployment
 

Assembly References and Deployment

Hello,

I have several assembly references in the GAC within my application. How does that work when I go to deploy my application? Can I copy them locally through the Copy Local property in property grid? Does that mean that I would need full trust to do that?

Thanks.

bmains  Saturday, October 13, 2007 1:43 AM
Ascend installs itself in the GAC, kinda necessary to make the design parts working. They don't provide a bootstrapper, I'd just flip Copy Local before deploying.
nobugz  Sunday, October 14, 2007 8:48 AM
You can't have an assembly reference from the GAC in your project. You'd be referencing a copy of such an assembly. The framework assembly copies live in c:\windows\ microsoft.net\ framework. If such an assembly is installed in the GAC on your dev machine, you'd leave Copy Local = False. If it isn't, you must use Copy Local = True so you get a copy of the assembly in your bin\debug folder and can debug your program.

At deployment time, you either choose to deploy the contents of your bin\release folder as-is (XCopy deployment). Or you install that assembly in the GAC. You should do the latter when you have multiple projects referencing that assembly.
nobugz  Saturday, October 13, 2007 3:38 PM

That makes sense, thanks. Because the machines I will be deploying to it will not have the software installed, I will choose the Copy Local option. Another question; I did that for a project that has windows components earlier, but those components weren't being deployed to the executable project. Should I then just add the references manually there too, and set the Copy Local option there as well?

bmains  Saturday, October 13, 2007 3:43 PM
What kind of windows components are you talking about?
nobugz  Saturday, October 13, 2007 4:02 PM

I downloaded the ASCEND.NET components, which is a control framework on the CodePlex site, as well as a few others along the same lines. I added them to my windows project, but my executable project, when built, didn't get them copied into the bin\debug folder. Normally it copies any references that other projects have as you surely know.

bmains  Sunday, October 14, 2007 1:32 AM
Ascend installs itself in the GAC, kinda necessary to make the design parts working. They don't provide a bootstrapper, I'd just flip Copy Local before deploying.
nobugz  Sunday, October 14, 2007 8:48 AM

You can use google to search for other answers

Custom Search

More Threads

• Converting a string to form
• Calling a vbscript function from javascript
• LicenseProvider equivalent for an entire assembly
• DataGridView End Cell Edit
• Controls : avoid seeing my controls painting
• C# question
• can we pass a value to windows services?
• I can’t persist the command properties of my dataadapter between calls to the data layer class.
• Problem building user control in form
• controlling speaker's volume