Set a path where projects search for references?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mats-Lennart Hansson

    Set a path where projects search for references?

    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


  • Yunus Emre ALPÖZEN [MCAD.NET]

    #2
    Re: Set a path where projects search for references?

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

    System.Environm ent.CurrentDire ctory =
    System.Environm ent.GetFolderPa th(System.Envir onment.SpecialF older.DesktopDi rectory);

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

    --

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

    "Mats-Lennart Hansson" <ap_skallen@hot mail.com> wrote in message
    news:OzRn5qDXFH A.616@TK2MSFTNG P12.phx.gbl...[color=blue]
    > 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
    >[/color]


    Comment

    • Mats-Lennart Hansson

      #3
      Re: Set a path where projects search for references?

      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
      CurrentDirector y.

      Hope my question is understandable.

      Thanks,
      Mats-Lennart

      "Yunus Emre ALPÖZEN [MCAD.NET]" <yemre@msakadem ik.net> wrote in message
      news:%23PZD5fEX FHA.2776@TK2MSF TNGP12.phx.gbl. ..[color=blue]
      > Firstly, it searches current directory you can set current directory
      > whatever u want. For instance,
      >
      > System.Environm ent.CurrentDire ctory =
      > System.Environm ent.GetFolderPa th(System.Envir onment.SpecialF older.DesktopDi rectory);
      >
      > this codes sets current working directory to desktop directory. u can
      > easily extend it...
      >
      > --
      >
      > Thanks,
      > Yunus Emre ALPÖZEN
      > BSc, MCAD.NET
      >
      > "Mats-Lennart Hansson" <ap_skallen@hot mail.com> wrote in message
      > news:OzRn5qDXFH A.616@TK2MSFTNG P12.phx.gbl...[color=green]
      >> 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
      >>[/color]
      >
      >[/color]


      Comment

      • Yunus Emre ALPÖZEN [MCAD.NET]

        #4
        Re: Set a path where projects search for references?

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

        <configuratio n>
        <runtime>
        <assemblyBindin g xmlns="urn:sche mas-microsoft-com:asm.v1">
        <probing privatePath="bi n;bin2\subbin;b in3"/>
        </assemblyBinding >
        </runtime>
        </configuration>


        --

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

        "Mats-Lennart Hansson" <ap_skallen@hot mail.com> wrote in message
        news:%23r7qcnEX FHA.160@TK2MSFT NGP15.phx.gbl.. .[color=blue]
        > 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
        > CurrentDirector y.
        >
        > Hope my question is understandable.
        >
        > Thanks,
        > Mats-Lennart
        >
        > "Yunus Emre ALPÖZEN [MCAD.NET]" <yemre@msakadem ik.net> wrote in message
        > news:%23PZD5fEX FHA.2776@TK2MSF TNGP12.phx.gbl. ..[color=green]
        >> Firstly, it searches current directory you can set current directory
        >> whatever u want. For instance,
        >>
        >> System.Environm ent.CurrentDire ctory =
        >> System.Environm ent.GetFolderPa th(System.Envir onment.SpecialF older.DesktopDi rectory);
        >>
        >> this codes sets current working directory to desktop directory. u can
        >> easily extend it...
        >>
        >> --
        >>
        >> Thanks,
        >> Yunus Emre ALPÖZEN
        >> BSc, MCAD.NET
        >>
        >> "Mats-Lennart Hansson" <ap_skallen@hot mail.com> wrote in message
        >> news:OzRn5qDXFH A.616@TK2MSFTNG P12.phx.gbl...[color=darkred]
        >>> 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
        >>>[/color]
        >>
        >>[/color]
        >
        >[/color]


        Comment

        Working...