How to relocate the "bin" directory

Coreysan 1,811 Reputation points
2021-09-10T00:49:20.53+00:00

My production app dlls are in the top level "bin" directory.
I'd like to have a test app sitting side by side, where the test version can point to an alternate "bin" directory with different dlls.

Can this be done?

I've tried using:
<probing privatePath="bin\debug" />

in the web.config file and it didn't help.

Developer technologies | ASP.NET | ASP.NET Core
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce Zhang-MSFT 3,771 Reputation points
    2021-09-10T03:27:42.4+00:00

    Hi @Coreysan ,

    First you need to make sure the structure of web.config is right. Here is s sample structure.

    <configuration>  
        <system.web>  
            <compilation debug="true" targetFramework="4.0">  
                <assemblies>  
                    <add assembly="Something.Web" />  
                </assemblies>          
            </compilation>  
        </system.web>  
        <runtime>  
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
                <probing privatePath="bin\debug" />  
            </assemblyBinding>  
        </runtime>  
    </configuration>  
    

    So the second thing is use add assembly to tell the name of assembly. Because if the server finds the file, and successfully loads the assembly and the class it will start complaining about all the missing referenced files.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Bruce Zhang

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.