Set a path where projects search for references?

  • Thread starter Mats-Lennart Hansson
  • Start date
M

Mats-Lennart Hansson

Hi,
Is there a way to set a path (on computer or project basis) where the
project should search for referenced assemblies?

I have a build program in which I build all projects into the same
directory. However, since my projects have project references instead of
direct assembly references I get an error when trying to build a project
that's referencing another project. Is there a way to make my projects to
search for references in this directory as well as the standard directories?

Thanks,

Mats-Lennart
 
Y

Yunus Emre ALPÖZEN [MCAD.NET]

Firstly, it searches current directory you can set current directory
whatever u want. For instance,

System.Environment.CurrentDirectory =
System.Environment.GetFolderPath(System.Environment.SpecialFolder.DesktopDirectory);

this codes sets current working directory to desktop directory. u can easily
extend it...
 
M

Mats-Lennart Hansson

Thanks for reply!

However, I don't want to make any code changes if possible. I just want the
compiler to search for assembly references in other directories, since the
product can be installed in differenct places I don't want to change
CurrentDirectory.

Hope my question is understandable.

Thanks,
Mats-Lennart
 
Y

Yunus Emre ALPÖZEN [MCAD.NET]

Ok. here is a sample configuration for u. I just copied it from MSDN.

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2\subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>


--

Thanks,
Yunus Emre ALPÖZEN
BSc, MCAD.NET
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top