none
change in hintPath of .btproj file

    Question

  • Hi,

    As my projects were refering to the GAC dll fies, I wanted it to change to the absulute local path and I discovered that I can do that using  hintPath in .btproj file

    I made changes in .btproj and tried to open the solution again , but those changes are not reflected in Visual studio.

    I opened .btproj with notepad and those changes were actually there. But then why its not showing in Visual studio IDE

    How to fix this?


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Thursday, September 14, 2017 2:09 PM

All replies

  • What are the symptons?

    • You don't see the Path property to your hintPath when selects the referenced library

    or

    • You compile with changes that are only in your hintPath dll and you solution doesn't compile?

    or

    ....

    Thursday, September 14, 2017 2:39 PM
  • HOLD ON!  Why do you think you need to do this?

    Please describe your situation and the problem you're facing so we can provide the best advice.

    98.7%, it will not involve referencing absolute paths.

    Thursday, September 14, 2017 2:42 PM
    Moderator
  • What are the symptons?

    • You don't see the Path property to your hintPath when selects the referenced library

    or

    • You compile with changes that are only in your hintPath dll and you solution doesn't compile?

    or

    ....

    thanks Mondelo,

    f.ex. in .btproj(opened with notepad)--->

    <Reference Include="SchSchema, Version=1.2.0.0, Culture=neutral, PublicKeyToken=7b2337f96aa015e3, processorArchitecture=MSIL">
          <SpecificVersion>False</SpecificVersion>
          <HintPath>D:\References\bin\SchSchema.dll</HintPath>
        </Reference>

    but when I opened the solution in visual studio it shows diffrenct in Path field--->

    Path: C:\Windows\Microsoft.Net\assembly\GAC_MSIL\C:\Windows\Microsoft.Net\assembly\GAC_MSIL\C:\Windows\Microsoft.Net\assembly\GAC_MSIL\SchSchema\v4.0_1.2.0.0__7b2337f96aa015e3\SchSchema.dll\v4.0_1.2.0.0__7b2337f96aa015e3\SchSchema.dll\v4.0_1.2.0.0__7b2337f96aa015e3\SchSchema.dll


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Friday, September 15, 2017 8:28 AM
  • HOLD ON!  Why do you think you need to do this?

    Please describe your situation and the problem you're facing so we can provide the best advice.

    98.7%, it will not involve referencing absolute paths.

    thanks Johns,

    I want to change the path of the references as some of them referencing to GAC dll or some of them have relative path, so wanted to change that to the absulute path so changed that in the .btproj by changing <hintPath> 

    but this changes are not reflecting inthe VIsual studio solution explorer.

    its just showing the old path. 

    Do I need to make changes in somewhere else as well?


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Friday, September 15, 2017 8:34 AM
  • You said that you change it with Notepad, try to press Mouse Right button over the project -> Unload Project and then press another time Mouse Rigth button over the unloaded project -> Edit project. 

    Change there your hintPath and Save.

    Press another time Mouse Rigth button over the unloaded project and load the project.

    Friday, September 15, 2017 8:49 AM
  • You said that you change it with Notepad, try to press Mouse Right button over the project -> Unload Project and then press another time Mouse Rigth button over the unloaded project -> Edit project. 

    Change there your hintPath and Save.

    Press another time Mouse Rigth button over the unloaded project and load the project.

    thanks Mondelo,

    I tried this, It dint help.


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Friday, September 15, 2017 8:56 AM
  • Have you tried to delete the reference and add it another time from the local folder?
    • Edited by F.Mondelo Friday, September 15, 2017 9:00 AM
    Friday, September 15, 2017 9:00 AM
  • Have you tried to delete the reference and add it another time from the local folder?

    That takes lot of time,

    I have many solutions, many projects and several references.

    Thats why I choosed to make changes in <HintPath>


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Friday, September 15, 2017 9:19 AM
  • is there any other way?


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Friday, September 15, 2017 1:13 PM
  • HOLD ON AGAIN!

    Please explain why you think you need to do this.  I strongly recommend you don't follow any previous advice until we understand the driver for this.

    There is almost no scenarios where changing these paths is the correct thing to do. Realistically, there is a notable risk this will create more problems.

    Friday, September 15, 2017 1:23 PM
    Moderator
  • as I mentioned before, I want to change the referenced dll paths 


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Friday, September 15, 2017 1:37 PM
  • Hi har, yes, we understand what you want to do, but it's very, very important to understand why.

    What your asking to do should not be done at all.  We want to resolve you actual problem, not help you create new ones.

    Friday, September 15, 2017 1:45 PM
    Moderator
  • actually I want to change the paths, because when we will migrate or upgrade the projects it will refer to same dll

    GAC path can get changed in new envoironment. but if its pointing to local directory , same path system will be existing there.


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer

    Friday, September 15, 2017 1:49 PM
  • Ah-ha! Let's try to clear this up.

    GAC path can get changed in new envoironment. but if its pointing to local directory , same path system will be existing there.

    Actually, no, it can't.  Or rather, it doesn't matter.

    The GAC is managed by Windows so as long as Windows knows where the GAC is, your application, and you, have no need to know or care where it is.

    As for what you're seeing, notice the path is grey in the Properties page.  Visual Studio is virtualizing the path to the local GAC. If you open the project on a Windows instance where Windows is installed on a different drive, it will show a different path, also grey.

    Basically, you don't have a problem at all.  That is how all GAC's assemblies are treated in .Net based projects.

    Friday, September 15, 2017 2:01 PM
    Moderator
  • Ah-ha! Let's try to clear this up.

    GAC path can get changed in new envoironment. but if its pointing to local directory , same path system will be existing there.

    Actually, no, it can't.  Or rather, it doesn't matter.

    The GAC is managed by Windows so as long as Windows knows where the GAC is, your application, and you, have no need to know or care where it is.

    As for what you're seeing, notice the path is grey in the Properties page.  Visual Studio is virtualizing the path to the local GAC. If you open the project on a Windows instance where Windows is installed on a different drive, it will show a different path, also grey.

    Basically, you don't have a problem at all.  That is how all GAC's assemblies are treated in .Net based projects.

    but  then how about relative paths.

    Its getting changed to relative paths and we want them as a absulute path---

    FOR GAC---> Its not necesary that, referenced dll will be there as if that project is not deployed on that server.

    so to avoid all glitches and confusion decided to move all dlls to one folder and reference from there.

    • Edited by har Friday, September 15, 2017 2:49 PM
    Friday, September 15, 2017 2:43 PM
  • NO!  DON'T DO THAT!

    Trust us, you don't have any problems.  Using absolute paths* is not correct and you are actually creating a problem by doing so.

    All your Assemblies should be in the GAC.  All BizTalk Assemblies, all referenced helper Assemblies, all Pipeline Component Assemblies, everything.

    *Is someone telling you this? If so, please tell us what they're saying so we can help you explain to them how this works.

    Friday, September 15, 2017 3:04 PM
    Moderator
  • NO!  DON'T DO THAT!

    Trust us, you don't have any problems.  Using absolute paths* is not correct and you are actually creating a problem by doing so.

    All your Assemblies should be in the GAC.  All BizTalk Assemblies, all referenced helper Assemblies, all Pipeline Component Assemblies, everything.

    *Is someone telling you this? If so, please tell us what they're saying so we can help you explain to them how this works.

    you are correect Johns...

    Our client want us to make such changes, and I cant argue with them as I am not technically that strong....


    When you see answers and helpful posts, please click Vote As Helpful , Propose As Answer , and/or Mark As Answer


    • Edited by har Sunday, September 17, 2017 3:54 PM
    Sunday, September 17, 2017 3:53 PM
  • Consider, that fact that you realize this means you have a better grasp of the situation than they do.

    State it very simply, what they are asking for is simply wrong and will almost certainly cause problems.  This is in addition to the fact that it's completely unnecessary and requires a lot of work and maintenance to work around how things are supposed to work on their own.  If you're getting paid for this unnecessary work, I guess that's good for you ;)

    Show them this thread.  If they have any doubts, we can help explain it.

    Of course, you could just not do it and when it works...well, who can argue with that.

    Monday, September 18, 2017 1:50 PM
    Moderator