Hi all,
I have a .net windows application xx.exe, which reference
a private assembly yy.dll, the property "local copy" of
the yy.dll reference is automatically set to true, so the
yy.dll will be copied to the output folder, which is the
same folder as the xx.exe, that means when I deploy the
application xx.exe, I must include the yy.dll to the same
folder as the xx.exe exists in, but I want the folder that
include the xx.exe(it's always the application root dir)
to be clean, how do I move the yy.dll to a subfolder, that
means I want to change the private assembly to a different
folder from the application folder.
Regards 4 3667
If you're using 1.1, you can load an assembly from a fixed path using
Assembly.LoadFi le() but you'd have to modify your code so that it creates
types from your other assembly this way.
I think you can use AppDomain.Curre ntDomain.Append PrivatePath to add a path
that will be used in the resolution process. I do believe it does not accept
relative paths though, so if this is a subfolder of your app's root folder
you'll have to get the full path. Or just use .\Bin?
--
_______________ _____
Klaus H. Probst, MVP http://www.vbbox.com/
"Yang Liu" <an*******@disc ussions.microso ft.com> wrote in message
news:07******** *************** *****@phx.gbl.. . Hi all, I have a .net windows application xx.exe, which reference a private assembly yy.dll, the property "local copy" of the yy.dll reference is automatically set to true, so the yy.dll will be copied to the output folder, which is the same folder as the xx.exe, that means when I deploy the application xx.exe, I must include the yy.dll to the same folder as the xx.exe exists in, but I want the folder that include the xx.exe(it's always the application root dir) to be clean, how do I move the yy.dll to a subfolder, that means I want to change the private assembly to a different folder from the application folder.
Regards
If you're using 1.1, you can load an assembly from a fixed path using
Assembly.LoadFi le() but you'd have to modify your code so that it creates
types from your other assembly this way.
I think you can use AppDomain.Curre ntDomain.Append PrivatePath to add a path
that will be used in the resolution process. I do believe it does not accept
relative paths though, so if this is a subfolder of your app's root folder
you'll have to get the full path. Or just use .\Bin?
--
_______________ _____
Klaus H. Probst, MVP http://www.vbbox.com/
"Yang Liu" <an*******@disc ussions.microso ft.com> wrote in message
news:07******** *************** *****@phx.gbl.. . Hi all, I have a .net windows application xx.exe, which reference a private assembly yy.dll, the property "local copy" of the yy.dll reference is automatically set to true, so the yy.dll will be copied to the output folder, which is the same folder as the xx.exe, that means when I deploy the application xx.exe, I must include the yy.dll to the same folder as the xx.exe exists in, but I want the folder that include the xx.exe(it's always the application root dir) to be clean, how do I move the yy.dll to a subfolder, that means I want to change the private assembly to a different folder from the application folder.
Regards
Hi
You can use the PrivateBinPath propeerty in the config
file for this. You can create subfolders inside your bin
folder and specify the subfolder path in the
privatebinpath element of the config file. This will hint
the runtime to search for tyhe assembly in the specified
subfolder at the time of assemblty locaton. Optinally as
Klaus suggested you can do the same thru coding also
using the AppDomain.Curre ntDomain.Append PrivatePath snippet
hth
regards,
sr "Yang Liu" <an*******@disc ussions.microso ft.com> wrote in
messagenews:07******* *************** ******@phx.gbl. .. Hi all, I have a .net windows application xx.exe, which
reference a private assembly yy.dll, the property "local copy" of the yy.dll reference is automatically set to true, so
the yy.dll will be copied to the output folder, which is the same folder as the xx.exe, that means when I deploy the application xx.exe, I must include the yy.dll to the
same folder as the xx.exe exists in, but I want the folder
that include the xx.exe(it's always the application root dir) to be clean, how do I move the yy.dll to a subfolder,
that means I want to change the private assembly to a
different folder from the application folder.
Regards
.
Hi
You can use the PrivateBinPath propeerty in the config
file for this. You can create subfolders inside your bin
folder and specify the subfolder path in the
privatebinpath element of the config file. This will hint
the runtime to search for tyhe assembly in the specified
subfolder at the time of assemblty locaton. Optinally as
Klaus suggested you can do the same thru coding also
using the AppDomain.Curre ntDomain.Append PrivatePath snippet
hth
regards,
sr "Yang Liu" <an*******@disc ussions.microso ft.com> wrote in
messagenews:07******* *************** ******@phx.gbl. .. Hi all, I have a .net windows application xx.exe, which
reference a private assembly yy.dll, the property "local copy" of the yy.dll reference is automatically set to true, so
the yy.dll will be copied to the output folder, which is the same folder as the xx.exe, that means when I deploy the application xx.exe, I must include the yy.dll to the
same folder as the xx.exe exists in, but I want the folder
that include the xx.exe(it's always the application root dir) to be clean, how do I move the yy.dll to a subfolder,
that means I want to change the private assembly to a
different folder from the application folder.
Regards
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Yang Liu |
last post by:
Hi all,
I have a .net windows application xx.exe, which reference
a private assembly yy.dll, the property "local copy" of
the yy.dll reference is automatically set to true, so the
yy.dll will be copied to the output folder, which is the
same folder as the xx.exe, that means when I deploy the
application xx.exe, I must include the yy.dll to the same
folder as the xx.exe exists in, but I want the folder that
include the xx.exe(it's always...
|
by: Julie |
last post by:
I'm currently working in a mixed mode project where the exe is C#, there is a
managed C++ (DLL) assembly, that in part, includes some calls into a native
(unmamanged) DLL.
I can build/link/run just fine, the question isn't about that.
What I'm after is, if I have another client that uses the C++ managed assembly,
I want the unmanaged DLL somehow to tag along. I've looked at /link in AL.exe,
and /assemblymodule, but either I'm not...
|
by: Brad |
last post by:
I have one of those seemingly simple questions that evades/confuses me.
I've created an assembly with bass classes (classes meant to be inherited in
other assemblys). In a secondary assembly (my business layer) I created a
class which inherits from a base class in the first assembly....so far so
good.
If I create a third assembly (my UI layer) and add reference in it to the
business layer and I access a public variable in the business...
|
by: Richard Lewis Haggard |
last post by:
We are having a lot of trouble with problems relating to failures relating
to 'The located assembly's manifest definition with name 'xxx' does not
match the assembly reference" but none of us here really understand how this
could be an issue. The assemblies that the system is complaining about are
ones that we build here and we're not changing version numbers on anything.
The errors come and go with no apparent rhyme or reason.
We do not...
|
by: Ratul |
last post by:
Hi all!
I'm writing a winforms test harness which lets me specify a subfolder
from which to load a particular .net assembly dll. The idea is that
there will be multiple subfolders, each having this dll.
To ensure that there are no conflicts with similarly named assembly dll
files, I'm am trying to load a subdirectory's dll into its own
AppDomain. However when I call the
AppDomain.CreateInstanceFromAndUnwrap method, it throws an...
| |
by: Luis Arvayo |
last post by:
I am compiling and executing c# code at runtime and I need to define in
CompilerParameters.ReferencedAssemblies one of my own assemblies together
with the standard System.dll u others.
Example:
// compiler options
System.CodeDom.Compiler.CompilerParameters options = new
System.CodeDom.Compiler.CompilerParameters();
options.GenerateExecutable = false; // result is a dll
|
by: Sky |
last post by:
Hello:
I'm trying to make sense of snk files, when to use, under what conditions to
regenerate new ones,...can someone take a look if these statemes make sense?
And then the final questions at the end that they first statements bring up
in my mind...
a) Because two developers, unbeknownst to each other, can end up releaseing
different dll's with the same name, one should sign an assembly with a unique
tag. right?
|
by: Tony Johansson |
last post by:
Hello!
If I select a private assembly in ILDASM I get a lot of information listed
but if I select a shared assembly located at c:\window\assembly(GAC) I
get nothing listed.
So is this normal not seeing anything when using ILDASM on any
shared assembly located in the GAC.
Now to my second question:
If I create a shared assembly from a private assembly and then use
|
by: chage |
last post by:
Hi,
I have been searching around to try adding reference assembly to
another assembly during runtime, programatically. Is this possible
in .Net?
The reason for this is because i am having trouble using a library
that creates an instance of a Type that i specified, and it failed the
locate the Type during runtime, if i do not reference it during
compile time.
|
by: =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= |
last post by:
"parez" wrote:
Assembly.LoadWithPartialName does indeed work!!
Now, why is this incredibly useful routine deprecated and we are instructed
to use Assembly.Load instead which does not provide the same functionality?!?
I'll check now, but maybe someone knows... Is this deprecated routine still
available in Visual Studio 2008 and .NET 3.5?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |