Library References
-
Hello all. I made a NET class library, and now I want to reference it in my application. The add references dialog allow me to add a reference to the library but I want to reference the library in is Debug version when I'm in the Debug version of the application and its Release version when I'm in release mode ( as I do when I write code in C++ ) Is this possible or I only can reference one dll for Debug and Relese ??? Thanks.
-
Hello all. I made a NET class library, and now I want to reference it in my application. The add references dialog allow me to add a reference to the library but I want to reference the library in is Debug version when I'm in the Debug version of the application and its Release version when I'm in release mode ( as I do when I write code in C++ ) Is this possible or I only can reference one dll for Debug and Relese ??? Thanks.
If your two projects are in the same solution then you reference the project rather than the DLL (properly called an assembly in .NET) and Visual Studio takes care of the Debug/Release versions for you.
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
-
If your two projects are in the same solution then you reference the project rather than the DLL (properly called an assembly in .NET) and Visual Studio takes care of the Debug/Release versions for you.
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
I think this doesn't works. We have solution with an appication an a class library. Right now, the class libray is reference as a project, but my boss showed me on Friday that in a Release build the DLL that was copied to the Output Directory was the Debug version so I would prefer to use other solution (if exits)
-
I think this doesn't works. We have solution with an appication an a class library. Right now, the class libray is reference as a project, but my boss showed me on Friday that in a Release build the DLL that was copied to the Output Directory was the Debug version so I would prefer to use other solution (if exits)
That doesn't sound right to me. If you do a release build it should build the release versions of each of the assemblies. Did you do a rebuild of the solution? Make sure by deleting the bin and obj directories and seeing that it is building the right thing.
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
-
That doesn't sound right to me. If you do a release build it should build the release versions of each of the assemblies. Did you do a rebuild of the solution? Make sure by deleting the bin and obj directories and seeing that it is building the right thing.
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
Yeah I know that this strange but my boss showed to me. He made a rebuild of the release version and in the ouput window it showed that the Debug version was copied. Also we look at the dates of the dll and really the Debug version was copied to the Release output.
-
Yeah I know that this strange but my boss showed to me. He made a rebuild of the release version and in the ouput window it showed that the Debug version was copied. Also we look at the dates of the dll and really the Debug version was copied to the Release output.
The only thing I can think of is that the properties for the project(s) are messed up somewhere. I suggest you look at the properties for the project, in the Configuration Properties->Build page check that the Debug and Eelease versions are being put in the right places. For instance, check that the release isn't being put in the Debug folder or vice versa.
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
-
Yeah I know that this strange but my boss showed to me. He made a rebuild of the release version and in the ouput window it showed that the Debug version was copied. Also we look at the dates of the dll and really the Debug version was copied to the Release output.
Is the source for the .DLL in a seperate SOLUTION? What Colin is telling you will work if your .DLL Project and your application project are in the same solution. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Is the source for the .DLL in a seperate SOLUTION? What Colin is telling you will work if your .DLL Project and your application project are in the same solution. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
No, there are in the same solution. The only thing to comment is that the application is written in c++ and the dll in c#. I don't know if this can be the reason for the problem
-
No, there are in the same solution. The only thing to comment is that the application is written in c++ and the dll in c#. I don't know if this can be the reason for the problem
Then there shouldn't be a problem. If you rebuild the entire solution, instead of a project, AND use project references instead of assembly references in your C++ app, then selecting Release or Debug should apply to all projects in the solution. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Then there shouldn't be a problem. If you rebuild the entire solution, instead of a project, AND use project references instead of assembly references in your C++ app, then selecting Release or Debug should apply to all projects in the solution. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks Dave. I will try this.