471,605 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

File Referances debug vs. release mode

We are currently setting up our environment to file reference any assemblies
we plan on putting in the GAC. To prevent the developer from having to go
get the newest copy of the file and register it in the GAC we are planning
on having a common share where these files will live. So what we would like
to accomplish is this:

In Debug mode have the file reference there, with copy locally set to true,
but in release mode have the copy local set to false.

Any ideas on how to best accomplish this?
Thanks
Wayne Sepega
Feb 6 '06 #1
2 1938
Read up on "binding policy" in MSDN. A good place to start is
http://msdn.microsoft.com/library/de...assemblies.asp.

Rather than compiler directives,, you control assembly binding through the
application configuration file, publisher policy files, or machine.config.

HTH
--
Dale Preston
MCAD C#
MCSE, MCDBA
"Wayne Sepega" wrote:
We are currently setting up our environment to file reference any assemblies
we plan on putting in the GAC. To prevent the developer from having to go
get the newest copy of the file and register it in the GAC we are planning
on having a common share where these files will live. So what we would like
to accomplish is this:

In Debug mode have the file reference there, with copy locally set to true,
but in release mode have the copy local set to false.

Any ideas on how to best accomplish this?
Thanks
Wayne Sepega

Feb 7 '06 #2
I know how to control the bindings in such ways, but that's not what I was
trying to accomplish. Here's what I am trying to do, bit re-worded and
hopefully a bit more clear.

1) Allow file references for items that will be placed in the GAC in a
release set up
2) Not force the developer to have to add each assembly to their GAC on
their local box every time a change is made to the assembly
3) Have a common place for the assemblies
4) Still be able to debug the assemblies
5) Not have the assemblies deployed with the application in release mode
So say I have the following setup:

All projects are on P:
All GAC assemblies are available to the developers on K:

I want to add a reference to an assembly on K: to my project on P:, this
assembly needs to be copied local for debugging as I do not want to have to
put it in the GAC on my machine.

Now when I do a RELEASE mode build I don't want the Assembly copied locally
as I don't want it included in my deployment package, nor do I want to have
to remember to delete the assemblies each time I do a release build.

What I need to do is figure out how to flip the Copy Local value based on
build selection.

Thanks
Wayne

"Dale" <da******@nospam.nospam> wrote in message
news:4B**********************************@microsof t.com...
Read up on "binding policy" in MSDN. A good place to start is
http://msdn.microsoft.com/library/de...assemblies.asp.

Rather than compiler directives,, you control assembly binding through the
application configuration file, publisher policy files, or machine.config.

HTH
--
Dale Preston
MCAD C#
MCSE, MCDBA
"Wayne Sepega" wrote:
We are currently setting up our environment to file reference any
assemblies
we plan on putting in the GAC. To prevent the developer from having to go
get the newest copy of the file and register it in the GAC we are
planning
on having a common share where these files will live. So what we would
like
to accomplish is this:

In Debug mode have the file reference there, with copy locally set to
true,
but in release mode have the copy local set to false.

Any ideas on how to best accomplish this?
Thanks
Wayne Sepega

Mar 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by JM | last post: by
reply views Thread by =?Utf-8?B?SmVmLnB0Yw==?= | last post: by
3 posts views Thread by =?Utf-8?B?bG10dGFn?= | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.