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
  1. Home
  2. Web Development
  3. ASP.NET
  4. trying to debug assembly configuration

trying to debug assembly configuration

Scheduled Pinned Locked Moved ASP.NET
debuggingquestionworkspace
11 Posts 2 Posters 2 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.
  • M Offline
    M Offline
    Member 3919049
    wrote on last edited by
    #1

    I have a website - MyWebSite - that uses the following class library projects within its solution as tiers: BusinessObjects, DataAccess, DataInterface. I have a service - MyService - that uses the same tier structure in its own solution. MyWebSite has a reference to MyService.dll which resides in its bin directory. I have a Tester console app that resides within the MyService solution to test MyService. The Tester console app executes MyService successfully. When I copy MyService.dll to the bin directory of MyWebsite.dll shouldn't MyService.dll be a compilation of itself + the tier class library solutions that it references by default? In other words, shouldn't it be sufficient to just copy over the single MyService.dll without the additional dlls generated by its referenced projects? For some reason the MyService referenced projects aren't found when I copy over MyService.dll to the MyWebsite bin directory.

    N M 2 Replies Last reply
    0
    • M Member 3919049

      I have a website - MyWebSite - that uses the following class library projects within its solution as tiers: BusinessObjects, DataAccess, DataInterface. I have a service - MyService - that uses the same tier structure in its own solution. MyWebSite has a reference to MyService.dll which resides in its bin directory. I have a Tester console app that resides within the MyService solution to test MyService. The Tester console app executes MyService successfully. When I copy MyService.dll to the bin directory of MyWebsite.dll shouldn't MyService.dll be a compilation of itself + the tier class library solutions that it references by default? In other words, shouldn't it be sufficient to just copy over the single MyService.dll without the additional dlls generated by its referenced projects? For some reason the MyService referenced projects aren't found when I copy over MyService.dll to the MyWebsite bin directory.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Member 3919049 wrote:

      shouldn't it be sufficient to just copy over the single MyService.dll without the additional dlls generated by its referenced projects?

      No. Think about it. Dropping an assembly into the bin does compile anything. You need to add a reference to the assembly or project.


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • M Member 3919049

        I have a website - MyWebSite - that uses the following class library projects within its solution as tiers: BusinessObjects, DataAccess, DataInterface. I have a service - MyService - that uses the same tier structure in its own solution. MyWebSite has a reference to MyService.dll which resides in its bin directory. I have a Tester console app that resides within the MyService solution to test MyService. The Tester console app executes MyService successfully. When I copy MyService.dll to the bin directory of MyWebsite.dll shouldn't MyService.dll be a compilation of itself + the tier class library solutions that it references by default? In other words, shouldn't it be sufficient to just copy over the single MyService.dll without the additional dlls generated by its referenced projects? For some reason the MyService referenced projects aren't found when I copy over MyService.dll to the MyWebsite bin directory.

        M Offline
        M Offline
        Member 3919049
        wrote on last edited by
        #3

        Here's some more info - MyWebsite and MyService have the same tier structure of BusinessObjects, DataAccess and DataInterface. MyService is not finding a BusinessObject reference. However, I can add that BO reference to MyWebsite and this fixes the MyService error. However, the BusinessObjects definition in MyService should be isolated from the BusinessObjects definition in MyWebsite. Am I supposed to accomplish this through strong-naming the contents of MyService?

        N 1 Reply Last reply
        0
        • M Member 3919049

          Here's some more info - MyWebsite and MyService have the same tier structure of BusinessObjects, DataAccess and DataInterface. MyService is not finding a BusinessObject reference. However, I can add that BO reference to MyWebsite and this fixes the MyService error. However, the BusinessObjects definition in MyService should be isolated from the BusinessObjects definition in MyWebsite. Am I supposed to accomplish this through strong-naming the contents of MyService?

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Please stop what you are doing and pick up a basic book about developing ASP.NET applications. Most books I've seen cover the basic 3-tier design and how to add references.


          I know the language. I've read a book. - _Madmatt

          M 1 Reply Last reply
          0
          • N Not Active

            Please stop what you are doing and pick up a basic book about developing ASP.NET applications. Most books I've seen cover the basic 3-tier design and how to add references.


            I know the language. I've read a book. - _Madmatt

            M Offline
            M Offline
            Member 3919049
            wrote on last edited by
            #5

            Thanks Mark - I've done 8 years n-tier dev in ASP.NET so I'm familiar with adding references. The problem here is that MyWebsite has a dll reference to MyService and MyWebsite and MyService have the same tier structure. So when MyService is trying to access it's BusinessObjects project the runtime is actually trying to access to BusinessObjects project of the WebSite. I went ahead and applied a strong name to all of the projects in MyService and then copied the new MyService.dll to the MyWebsite bin directory. When MyService runs in MyWebsite the following error is now returned: Could not load file or assembly 'DataInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=68dd866efa467a61' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) So it looks like MyWebsite runtime now recognizes that MyService is trying to load its own DataInterface project. However, it looks like MyWebsite runtime still tries to load its own DataInterface project but the runtime throws an error b/c it recognizes that the assemblies don't match. Any suggestions on what I should do now?

            N 1 Reply Last reply
            0
            • M Member 3919049

              Thanks Mark - I've done 8 years n-tier dev in ASP.NET so I'm familiar with adding references. The problem here is that MyWebsite has a dll reference to MyService and MyWebsite and MyService have the same tier structure. So when MyService is trying to access it's BusinessObjects project the runtime is actually trying to access to BusinessObjects project of the WebSite. I went ahead and applied a strong name to all of the projects in MyService and then copied the new MyService.dll to the MyWebsite bin directory. When MyService runs in MyWebsite the following error is now returned: Could not load file or assembly 'DataInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=68dd866efa467a61' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) So it looks like MyWebsite runtime now recognizes that MyService is trying to load its own DataInterface project. However, it looks like MyWebsite runtime still tries to load its own DataInterface project but the runtime throws an error b/c it recognizes that the assemblies don't match. Any suggestions on what I should do now?

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              Member 3919049 wrote:

              I've done 8 years n-tier dev in ASP.NET

              :wtf: Then you shouldn't be asking such stupid questions. These are questions from a newbie. One tip, but after eight years you should know it, clear the asp.net temp folders.


              I know the language. I've read a book. - _Madmatt

              M 1 Reply Last reply
              0
              • N Not Active

                Member 3919049 wrote:

                I've done 8 years n-tier dev in ASP.NET

                :wtf: Then you shouldn't be asking such stupid questions. These are questions from a newbie. One tip, but after eight years you should know it, clear the asp.net temp folders.


                I know the language. I've read a book. - _Madmatt

                M Offline
                M Offline
                Member 3919049
                wrote on last edited by
                #7

                My MyService project has references to BusinessObjects, DataInterface and DataAccess projects within its solution. If I copy over the MyService.dll to MyWebsite it looks like (the way MyService is deployed/configured) I will have to copy over all of the additional dll's for projects referenced in MyService.dll. For example, if I copy the MyService BusinessObjects.dll to the GAC then MyWebsite finds the dll and uses it. I'm thinking that there must be a way to include all of the dependent dlls within MyService.dll as opposed to requiring that 4 dlls be copied to MyWebsite in order to use the functionality within MyService.dll. So how can I get all of the dll dependencies into a single MyService.dll?

                N 1 Reply Last reply
                0
                • M Member 3919049

                  My MyService project has references to BusinessObjects, DataInterface and DataAccess projects within its solution. If I copy over the MyService.dll to MyWebsite it looks like (the way MyService is deployed/configured) I will have to copy over all of the additional dll's for projects referenced in MyService.dll. For example, if I copy the MyService BusinessObjects.dll to the GAC then MyWebsite finds the dll and uses it. I'm thinking that there must be a way to include all of the dependent dlls within MyService.dll as opposed to requiring that 4 dlls be copied to MyWebsite in order to use the functionality within MyService.dll. So how can I get all of the dll dependencies into a single MyService.dll?

                  N Offline
                  N Offline
                  Not Active
                  wrote on last edited by
                  #8

                  :omg: Eight years of experience building n-tier web applications :omg: Seriously! From your previous posts you have been struggling with assembly references for two years. http://www.codeproject.com/Messages/2810094/Re-gacutil-version-question-modified.aspx[^] It's time to give up and change careers, this one isn't right for you. http://www.codeproject.com/Messages/3122380/HOW-TO-ANSWER-A-QUESTION.aspx[^] "Let's work to help developers, not make them feel stupid." I'm all for helping but you are making yourself look stupid and are beyond help at this point.


                  I know the language. I've read a book. - _Madmatt

                  M 1 Reply Last reply
                  0
                  • N Not Active

                    :omg: Eight years of experience building n-tier web applications :omg: Seriously! From your previous posts you have been struggling with assembly references for two years. http://www.codeproject.com/Messages/2810094/Re-gacutil-version-question-modified.aspx[^] It's time to give up and change careers, this one isn't right for you. http://www.codeproject.com/Messages/3122380/HOW-TO-ANSWER-A-QUESTION.aspx[^] "Let's work to help developers, not make them feel stupid." I'm all for helping but you are making yourself look stupid and are beyond help at this point.


                    I know the language. I've read a book. - _Madmatt

                    M Offline
                    M Offline
                    Member 3919049
                    wrote on last edited by
                    #9

                    Hi Mark - It looks like you earn MVP points no matter what you post (like your last post) cha-ching! automatic MVP point! I respect your professional goals but if you know how to combine multiple dlls into a single dll and you can share that information then that would really be more inline with this thread. Thanks!

                    M 1 Reply Last reply
                    0
                    • M Member 3919049

                      Hi Mark - It looks like you earn MVP points no matter what you post (like your last post) cha-ching! automatic MVP point! I respect your professional goals but if you know how to combine multiple dlls into a single dll and you can share that information then that would really be more inline with this thread. Thanks!

                      M Offline
                      M Offline
                      Member 3919049
                      wrote on last edited by
                      #10

                      I did some more research and it looks like Microsoft provides a tool called ILMerge that may do what I'm looking for. http://www.microsoft.com/downloads/details.aspx?familyid=22914587-b4ad-4eae-87cf-b14ae6a939b0&displaylang=en[^] I'll update this thread if ILMerge works well to provide a useful reference for someone else who may need to know how to do this in the future.

                      M 1 Reply Last reply
                      0
                      • M Member 3919049

                        I did some more research and it looks like Microsoft provides a tool called ILMerge that may do what I'm looking for. http://www.microsoft.com/downloads/details.aspx?familyid=22914587-b4ad-4eae-87cf-b14ae6a939b0&displaylang=en[^] I'll update this thread if ILMerge works well to provide a useful reference for someone else who may need to know how to do this in the future.

                        M Offline
                        M Offline
                        Member 3919049
                        wrote on last edited by
                        #11

                        It looks like ILMerge does exactly what I need it to do. Examples were kinda hard to find so I'm including one below. This command will take your MyMain.dll and package it with all of the child dlls into a new dll named MyMain.dll so it's transparent to the consumer of your dll: ilmerge /out:MyMain.dll ./dlls/MyMain.dll ./dlls/BusinessObjects.dll ./dlls/DataAccess.dll ./dlls/DataInterface.dll Nice tool!

                        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