Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Library References

Library References

Scheduled Pinned Locked Moved C#
announcementc++debuggingquestion
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jose Vicente
    wrote on last edited by
    #1

    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.

    C 1 Reply Last reply
    0
    • J Jose Vicente

      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.

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      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.


      Do you want to know more?


      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.

      J 1 Reply Last reply
      0
      • C Colin Angus Mackay

        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.


        Do you want to know more?


        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.

        J Offline
        J Offline
        Jose Vicente
        wrote on last edited by
        #3

        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)

        C 1 Reply Last reply
        0
        • J Jose Vicente

          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)

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          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.


          Do you want to know more?


          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.

          J 1 Reply Last reply
          0
          • C Colin Angus Mackay

            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.


            Do you want to know more?


            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.

            J Offline
            J Offline
            Jose Vicente
            wrote on last edited by
            #5

            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.

            C D 2 Replies Last reply
            0
            • J Jose Vicente

              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.

              C Offline
              C Offline
              Colin Angus Mackay
              wrote on last edited by
              #6

              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.


              Do you want to know more?


              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.

              1 Reply Last reply
              0
              • J Jose Vicente

                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.

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                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

                J 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  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

                  J Offline
                  J Offline
                  Jose Vicente
                  wrote on last edited by
                  #8

                  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

                  D 1 Reply Last reply
                  0
                  • J Jose Vicente

                    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

                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #9

                    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

                    J 1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      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

                      J Offline
                      J Offline
                      Jose Vicente
                      wrote on last edited by
                      #10

                      Thanks Dave. I will try this.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups