newbe C# Project Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jones

    newbe C# Project Question

    I am having problems with my C# project. The project was built using VS.net
    (original release with service pack 1). The project includes windows forms
    and a DLL (dot.net)

    After getting the application working, everything compiled and was
    troubleshooted. Ready for delivery, the owner decided to change the Name of
    the application and DLL.

    After discussing this with another developer, we decided that the namespace
    in the application needed to be changed as well.

    I have changed Namespace name to the new name, DLL was renamed, and the
    application was compiled several times. With clean compiles.

    However, when I execute the code (in IDE or direct) the code errors out when
    it attempts to access any of the DLL classes.

    I have checked the references, pathing, compiling. All the possible errors
    I could think of and all point to the New DLL name and Correct Namespace. I
    have even checked for namespace misspellings. All have the same spelling.

    Example Error Message:
    " Could not load type Questionnaire.C onfiguration from assembly
    Questionnaire, Version=1.0.135 6.17027, Culture=neutral ,PublicKeyToken =null,
    Questionnaire"

    Please Help.




  • 100

    #2
    Re: newbe C# Project Question

    Hi Jones,

    Did you recompile the DLL as well?

    B\rgds
    100

    "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
    news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...[color=blue]
    > I am having problems with my C# project. The project was built using[/color]
    VS.net[color=blue]
    > (original release with service pack 1). The project includes windows[/color]
    forms[color=blue]
    > and a DLL (dot.net)
    >
    > After getting the application working, everything compiled and was
    > troubleshooted. Ready for delivery, the owner decided to change the Name[/color]
    of[color=blue]
    > the application and DLL.
    >
    > After discussing this with another developer, we decided that the[/color]
    namespace[color=blue]
    > in the application needed to be changed as well.
    >
    > I have changed Namespace name to the new name, DLL was renamed, and the
    > application was compiled several times. With clean compiles.
    >
    > However, when I execute the code (in IDE or direct) the code errors out[/color]
    when[color=blue]
    > it attempts to access any of the DLL classes.
    >
    > I have checked the references, pathing, compiling. All the possible[/color]
    errors[color=blue]
    > I could think of and all point to the New DLL name and Correct Namespace.[/color]
    I[color=blue]
    > have even checked for namespace misspellings. All have the same spelling.
    >
    > Example Error Message:
    > " Could not load type Questionnaire.C onfiguration from assembly
    > Questionnaire, Version=1.0.135 6.17027,[/color]
    Culture=neutral ,PublicKeyToken =null,[color=blue]
    > Questionnaire"
    >
    > Please Help.
    >
    >
    >
    >[/color]


    Comment

    • Jones

      #3
      Re: newbe C# Project Question

      Yes.
      The DLL was recompiled several times.
      In the Application project, I have even included the DLL Project and
      changed the references, still with no success.

      "100" <100@100.com> wrote in message
      news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...[color=blue]
      > Hi Jones,
      >
      > Did you recompile the DLL as well?
      >
      > B\rgds
      > 100
      >
      > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
      > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...[color=green]
      > > I am having problems with my C# project. The project was built using[/color]
      > VS.net[color=green]
      > > (original release with service pack 1). The project includes windows[/color]
      > forms[color=green]
      > > and a DLL (dot.net)
      > >
      > > After getting the application working, everything compiled and was
      > > troubleshooted. Ready for delivery, the owner decided to change the[/color][/color]
      Name[color=blue]
      > of[color=green]
      > > the application and DLL.
      > >
      > > After discussing this with another developer, we decided that the[/color]
      > namespace[color=green]
      > > in the application needed to be changed as well.
      > >
      > > I have changed Namespace name to the new name, DLL was renamed, and the
      > > application was compiled several times. With clean compiles.
      > >
      > > However, when I execute the code (in IDE or direct) the code errors out[/color]
      > when[color=green]
      > > it attempts to access any of the DLL classes.
      > >
      > > I have checked the references, pathing, compiling. All the possible[/color]
      > errors[color=green]
      > > I could think of and all point to the New DLL name and Correct[/color][/color]
      Namespace.[color=blue]
      > I[color=green]
      > > have even checked for namespace misspellings. All have the same[/color][/color]
      spelling.[color=blue][color=green]
      > >
      > > Example Error Message:
      > > " Could not load type Questionnaire.C onfiguration from assembly
      > > Questionnaire, Version=1.0.135 6.17027,[/color]
      > Culture=neutral ,PublicKeyToken =null,[color=green]
      > > Questionnaire"
      > >
      > > Please Help.
      > >
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • 100

        #4
        Re: newbe C# Project Question

        Do you load the DLL assembly dynamically or the acception is thrown when you
        try to use a type in a "normal" way?

        Anyway, what I can suggest to you is to load the dll in ILDasm tool and look
        at the types your DLL exports and see if your type is among them.

        "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
        news:dmkab.3953 5$sd5.3635556@t wister.columbus .rr.com...[color=blue]
        > Yes.
        > The DLL was recompiled several times.
        > In the Application project, I have even included the DLL Project and
        > changed the references, still with no success.
        >
        > "100" <100@100.com> wrote in message
        > news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...[color=green]
        > > Hi Jones,
        > >
        > > Did you recompile the DLL as well?
        > >
        > > B\rgds
        > > 100
        > >
        > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
        > > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...[color=darkred]
        > > > I am having problems with my C# project. The project was built using[/color]
        > > VS.net[color=darkred]
        > > > (original release with service pack 1). The project includes windows[/color]
        > > forms[color=darkred]
        > > > and a DLL (dot.net)
        > > >
        > > > After getting the application working, everything compiled and was
        > > > troubleshooted. Ready for delivery, the owner decided to change the[/color][/color]
        > Name[color=green]
        > > of[color=darkred]
        > > > the application and DLL.
        > > >
        > > > After discussing this with another developer, we decided that the[/color]
        > > namespace[color=darkred]
        > > > in the application needed to be changed as well.
        > > >
        > > > I have changed Namespace name to the new name, DLL was renamed, and[/color][/color][/color]
        the[color=blue][color=green][color=darkred]
        > > > application was compiled several times. With clean compiles.
        > > >
        > > > However, when I execute the code (in IDE or direct) the code errors[/color][/color][/color]
        out[color=blue][color=green]
        > > when[color=darkred]
        > > > it attempts to access any of the DLL classes.
        > > >
        > > > I have checked the references, pathing, compiling. All the possible[/color]
        > > errors[color=darkred]
        > > > I could think of and all point to the New DLL name and Correct[/color][/color]
        > Namespace.[color=green]
        > > I[color=darkred]
        > > > have even checked for namespace misspellings. All have the same[/color][/color]
        > spelling.[color=green][color=darkred]
        > > >
        > > > Example Error Message:
        > > > " Could not load type Questionnaire.C onfiguration from assembly
        > > > Questionnaire, Version=1.0.135 6.17027,[/color]
        > > Culture=neutral ,PublicKeyToken =null,[color=darkred]
        > > > Questionnaire"
        > > >
        > > > Please Help.
        > > >
        > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Jones

          #5
          Re: newbe C# Project Question

          I add the DLL to the references of the application and just reference the
          classes like normal.

          ie:
          Survey mySurvey = new Survey();

          where do I find the "ILDasm tool"?

          "100" <100@100.com> wrote in message
          news:uOLR$9ffDH A.3204@TK2MSFTN GP11.phx.gbl...[color=blue]
          > Do you load the DLL assembly dynamically or the acception is thrown when[/color]
          you[color=blue]
          > try to use a type in a "normal" way?
          >
          > Anyway, what I can suggest to you is to load the dll in ILDasm tool and[/color]
          look[color=blue]
          > at the types your DLL exports and see if your type is among them.
          >
          > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
          > news:dmkab.3953 5$sd5.3635556@t wister.columbus .rr.com...[color=green]
          > > Yes.
          > > The DLL was recompiled several times.
          > > In the Application project, I have even included the DLL Project and
          > > changed the references, still with no success.
          > >
          > > "100" <100@100.com> wrote in message
          > > news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...[color=darkred]
          > > > Hi Jones,
          > > >
          > > > Did you recompile the DLL as well?
          > > >
          > > > B\rgds
          > > > 100
          > > >
          > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
          > > > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...
          > > > > I am having problems with my C# project. The project was built[/color][/color][/color]
          using[color=blue][color=green][color=darkred]
          > > > VS.net
          > > > > (original release with service pack 1). The project includes[/color][/color][/color]
          windows[color=blue][color=green][color=darkred]
          > > > forms
          > > > > and a DLL (dot.net)
          > > > >
          > > > > After getting the application working, everything compiled and was
          > > > > troubleshooted. Ready for delivery, the owner decided to change the[/color]
          > > Name[color=darkred]
          > > > of
          > > > > the application and DLL.
          > > > >
          > > > > After discussing this with another developer, we decided that the
          > > > namespace
          > > > > in the application needed to be changed as well.
          > > > >
          > > > > I have changed Namespace name to the new name, DLL was renamed, and[/color][/color]
          > the[color=green][color=darkred]
          > > > > application was compiled several times. With clean compiles.
          > > > >
          > > > > However, when I execute the code (in IDE or direct) the code errors[/color][/color]
          > out[color=green][color=darkred]
          > > > when
          > > > > it attempts to access any of the DLL classes.
          > > > >
          > > > > I have checked the references, pathing, compiling. All the possible
          > > > errors
          > > > > I could think of and all point to the New DLL name and Correct[/color]
          > > Namespace.[color=darkred]
          > > > I
          > > > > have even checked for namespace misspellings. All have the same[/color]
          > > spelling.[color=darkred]
          > > > >
          > > > > Example Error Message:
          > > > > " Could not load type Questionnaire.C onfiguration from assembly
          > > > > Questionnaire, Version=1.0.135 6.17027,
          > > > Culture=neutral ,PublicKeyToken =null,
          > > > > Questionnaire"
          > > > >
          > > > > Please Help.
          > > > >
          > > > >
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • 100

            #6
            Re: newbe C# Project Question

            In my computer ILDasm is located in:
            C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\B in
            I believe in your too.


            "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
            news:%2lab.3953 6$sd5.3644086@t wister.columbus .rr.com...[color=blue]
            > I add the DLL to the references of the application and just reference the
            > classes like normal.
            >
            > ie:
            > Survey mySurvey = new Survey();
            >
            > where do I find the "ILDasm tool"?
            >
            > "100" <100@100.com> wrote in message
            > news:uOLR$9ffDH A.3204@TK2MSFTN GP11.phx.gbl...[color=green]
            > > Do you load the DLL assembly dynamically or the acception is thrown when[/color]
            > you[color=green]
            > > try to use a type in a "normal" way?
            > >
            > > Anyway, what I can suggest to you is to load the dll in ILDasm tool and[/color]
            > look[color=green]
            > > at the types your DLL exports and see if your type is among them.
            > >
            > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
            > > news:dmkab.3953 5$sd5.3635556@t wister.columbus .rr.com...[color=darkred]
            > > > Yes.
            > > > The DLL was recompiled several times.
            > > > In the Application project, I have even included the DLL Project and
            > > > changed the references, still with no success.
            > > >
            > > > "100" <100@100.com> wrote in message
            > > > news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...
            > > > > Hi Jones,
            > > > >
            > > > > Did you recompile the DLL as well?
            > > > >
            > > > > B\rgds
            > > > > 100
            > > > >
            > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
            > > > > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...
            > > > > > I am having problems with my C# project. The project was built[/color][/color]
            > using[color=green][color=darkred]
            > > > > VS.net
            > > > > > (original release with service pack 1). The project includes[/color][/color]
            > windows[color=green][color=darkred]
            > > > > forms
            > > > > > and a DLL (dot.net)
            > > > > >
            > > > > > After getting the application working, everything compiled and was
            > > > > > troubleshooted. Ready for delivery, the owner decided to change[/color][/color][/color]
            the[color=blue][color=green][color=darkred]
            > > > Name
            > > > > of
            > > > > > the application and DLL.
            > > > > >
            > > > > > After discussing this with another developer, we decided that the
            > > > > namespace
            > > > > > in the application needed to be changed as well.
            > > > > >
            > > > > > I have changed Namespace name to the new name, DLL was renamed,[/color][/color][/color]
            and[color=blue][color=green]
            > > the[color=darkred]
            > > > > > application was compiled several times. With clean compiles.
            > > > > >
            > > > > > However, when I execute the code (in IDE or direct) the code[/color][/color][/color]
            errors[color=blue][color=green]
            > > out[color=darkred]
            > > > > when
            > > > > > it attempts to access any of the DLL classes.
            > > > > >
            > > > > > I have checked the references, pathing, compiling. All the[/color][/color][/color]
            possible[color=blue][color=green][color=darkred]
            > > > > errors
            > > > > > I could think of and all point to the New DLL name and Correct
            > > > Namespace.
            > > > > I
            > > > > > have even checked for namespace misspellings. All have the same
            > > > spelling.
            > > > > >
            > > > > > Example Error Message:
            > > > > > " Could not load type Questionnaire.C onfiguration from assembly
            > > > > > Questionnaire, Version=1.0.135 6.17027,
            > > > > Culture=neutral ,PublicKeyToken =null,
            > > > > > Questionnaire"
            > > > > >
            > > > > > Please Help.
            > > > > >
            > > > > >
            > > > > >
            > > > > >
            > > > >
            > > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Scott C. Reynolds

              #7
              Re: newbe C# Project Question

              or just go to Visual Studio Command Prompt and type "ildasm"

              100 wrote:
              [color=blue]
              >In my computer ILDasm is located in:
              >C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\B in
              >I believe in your too.
              >
              >
              >"Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
              >news:%2lab.395 36$sd5.3644086@ twister.columbu s.rr.com...
              >
              >[color=green]
              >>I add the DLL to the references of the application and just reference the
              >>classes like normal.
              >>
              >> ie:
              >> Survey mySurvey = new Survey();
              >>
              >>where do I find the "ILDasm tool"?
              >>
              >>"100" <100@100.com> wrote in message
              >>news:uOLR$9ff DHA.3204@TK2MSF TNGP11.phx.gbl. ..
              >>
              >>[color=darkred]
              >>>Do you load the DLL assembly dynamically or the acception is thrown when
              >>>
              >>>[/color]
              >>you
              >>
              >>[color=darkred]
              >>>try to use a type in a "normal" way?
              >>>
              >>>Anyway, what I can suggest to you is to load the dll in ILDasm tool and
              >>>
              >>>[/color]
              >>look
              >>
              >>[color=darkred]
              >>>at the types your DLL exports and see if your type is among them.
              >>>
              >>>"Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
              >>>news:dmkab.3 9535$sd5.363555 6@twister.colum bus.rr.com...
              >>>
              >>>
              >>>>Yes.
              >>>> The DLL was recompiled several times.
              >>>> In the Application project, I have even included the DLL Project and
              >>>>changed the references, still with no success.
              >>>>
              >>>>"100" <100@100.com> wrote in message
              >>>>news:ezrZHp ffDHA.556@TK2MS FTNGP11.phx.gbl ...
              >>>>
              >>>>
              >>>>>Hi Jones,
              >>>>>
              >>>>>Did you recompile the DLL as well?
              >>>>>
              >>>>>B\rgds
              >>>>>100
              >>>>>
              >>>>>"Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
              >>>>>news:_6kab .39534$sd5.3633 702@twister.col umbus.rr.com...
              >>>>>
              >>>>>
              >>>>>>I am having problems with my C# project. The project was built
              >>>>>>
              >>>>>>[/color]
              >>using
              >>
              >>[color=darkred]
              >>>>>VS.net
              >>>>>
              >>>>>
              >>>>>>(origin al release with service pack 1). The project includes
              >>>>>>
              >>>>>>[/color]
              >>windows
              >>
              >>[color=darkred]
              >>>>>forms
              >>>>>
              >>>>>
              >>>>>>and a DLL (dot.net)
              >>>>>>
              >>>>>>After getting the application working, everything compiled and was
              >>>>>>troublesh ooted. Ready for delivery, the owner decided to change
              >>>>>>
              >>>>>>[/color][/color]
              >the
              >
              >[color=green][color=darkred]
              >>>>Name
              >>>>
              >>>>
              >>>>>of
              >>>>>
              >>>>>
              >>>>>>the application and DLL.
              >>>>>>
              >>>>>>After discussing this with another developer, we decided that the
              >>>>>>
              >>>>>>
              >>>>>namespac e
              >>>>>
              >>>>>
              >>>>>>in the application needed to be changed as well.
              >>>>>>
              >>>>>>I have changed Namespace name to the new name, DLL was renamed,
              >>>>>>
              >>>>>>[/color][/color]
              >and
              >
              >[color=green][color=darkred]
              >>>the
              >>>
              >>>
              >>>>>>applicati on was compiled several times. With clean compiles.
              >>>>>>
              >>>>>>However , when I execute the code (in IDE or direct) the code
              >>>>>>
              >>>>>>[/color][/color]
              >errors
              >
              >[color=green][color=darkred]
              >>>out
              >>>
              >>>
              >>>>>when
              >>>>>
              >>>>>
              >>>>>>it attempts to access any of the DLL classes.
              >>>>>>
              >>>>>>I have checked the references, pathing, compiling. All the
              >>>>>>
              >>>>>>[/color][/color]
              >possible
              >
              >[color=green][color=darkred]
              >>>>>errors
              >>>>>
              >>>>>
              >>>>>>I could think of and all point to the New DLL name and Correct
              >>>>>>
              >>>>>>
              >>>>Namespace .
              >>>>
              >>>>
              >>>>>I
              >>>>>
              >>>>>
              >>>>>>have even checked for namespace misspellings. All have the same
              >>>>>>
              >>>>>>
              >>>>spelling.
              >>>>
              >>>>
              >>>>>>Example Error Message:
              >>>>>>" Could not load type Questionnaire.C onfiguration from assembly
              >>>>>>Questionn aire, Version=1.0.135 6.17027,
              >>>>>>
              >>>>>>
              >>>>>Culture=ne utral,PublicKey Token=null,
              >>>>>
              >>>>>
              >>>>>>Questionn aire"
              >>>>>>
              >>>>>>Please Help.
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>
              >>>>>
              >>>>
              >>>>
              >>>
              >>>[/color]
              >>
              >>[/color]
              >
              >
              >
              >[/color]

              Comment

              • Jones

                #8
                Re: newbe C# Project Question

                I looked in the DLL. Everything seems correct.
                I looked in the application and found this:
                (symbol=box) method
                LoadAnswerGroup :void(class[Questionnaire]Questionnaire.A nswerGroup)

                Could this be the problem, and if so, How do I fix it?

                "100" <100@100.com> wrote in message
                news:%23oBSjNgf DHA.3896@tk2msf tngp13.phx.gbl. ..[color=blue]
                > In my computer ILDasm is located in:
                > C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\B in
                > I believe in your too.
                >
                >
                > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                > news:%2lab.3953 6$sd5.3644086@t wister.columbus .rr.com...[color=green]
                > > I add the DLL to the references of the application and just reference[/color][/color]
                the[color=blue][color=green]
                > > classes like normal.
                > >
                > > ie:
                > > Survey mySurvey = new Survey();
                > >
                > > where do I find the "ILDasm tool"?
                > >
                > > "100" <100@100.com> wrote in message
                > > news:uOLR$9ffDH A.3204@TK2MSFTN GP11.phx.gbl...[color=darkred]
                > > > Do you load the DLL assembly dynamically or the acception is thrown[/color][/color][/color]
                when[color=blue][color=green]
                > > you[color=darkred]
                > > > try to use a type in a "normal" way?
                > > >
                > > > Anyway, what I can suggest to you is to load the dll in ILDasm tool[/color][/color][/color]
                and[color=blue][color=green]
                > > look[color=darkred]
                > > > at the types your DLL exports and see if your type is among them.
                > > >
                > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                > > > news:dmkab.3953 5$sd5.3635556@t wister.columbus .rr.com...
                > > > > Yes.
                > > > > The DLL was recompiled several times.
                > > > > In the Application project, I have even included the DLL Project[/color][/color][/color]
                and[color=blue][color=green][color=darkred]
                > > > > changed the references, still with no success.
                > > > >
                > > > > "100" <100@100.com> wrote in message
                > > > > news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...
                > > > > > Hi Jones,
                > > > > >
                > > > > > Did you recompile the DLL as well?
                > > > > >
                > > > > > B\rgds
                > > > > > 100
                > > > > >
                > > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                > > > > > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...
                > > > > > > I am having problems with my C# project. The project was built[/color]
                > > using[color=darkred]
                > > > > > VS.net
                > > > > > > (original release with service pack 1). The project includes[/color]
                > > windows[color=darkred]
                > > > > > forms
                > > > > > > and a DLL (dot.net)
                > > > > > >
                > > > > > > After getting the application working, everything compiled and[/color][/color][/color]
                was[color=blue][color=green][color=darkred]
                > > > > > > troubleshooted. Ready for delivery, the owner decided to change[/color][/color]
                > the[color=green][color=darkred]
                > > > > Name
                > > > > > of
                > > > > > > the application and DLL.
                > > > > > >
                > > > > > > After discussing this with another developer, we decided that[/color][/color][/color]
                the[color=blue][color=green][color=darkred]
                > > > > > namespace
                > > > > > > in the application needed to be changed as well.
                > > > > > >
                > > > > > > I have changed Namespace name to the new name, DLL was renamed,[/color][/color]
                > and[color=green][color=darkred]
                > > > the
                > > > > > > application was compiled several times. With clean compiles.
                > > > > > >
                > > > > > > However, when I execute the code (in IDE or direct) the code[/color][/color]
                > errors[color=green][color=darkred]
                > > > out
                > > > > > when
                > > > > > > it attempts to access any of the DLL classes.
                > > > > > >
                > > > > > > I have checked the references, pathing, compiling. All the[/color][/color]
                > possible[color=green][color=darkred]
                > > > > > errors
                > > > > > > I could think of and all point to the New DLL name and Correct
                > > > > Namespace.
                > > > > > I
                > > > > > > have even checked for namespace misspellings. All have the same
                > > > > spelling.
                > > > > > >
                > > > > > > Example Error Message:
                > > > > > > " Could not load type Questionnaire.C onfiguration from assembly
                > > > > > > Questionnaire, Version=1.0.135 6.17027,
                > > > > > Culture=neutral ,PublicKeyToken =null,
                > > > > > > Questionnaire"
                > > > > > >
                > > > > > > Please Help.
                > > > > > >
                > > > > > >
                > > > > > >
                > > > > > >
                > > > > >
                > > > > >
                > > > >
                > > > >
                > > >
                > > >[/color]
                > >
                > >[/color]
                >
                >[/color]


                Comment

                • 100

                  #9
                  Re: newbe C# Project Question

                  Frankly, I don't know what (symbol=box) menas. Maybe sombody else can help
                  us out with this. I haven't seen it before.
                  Anyway the rest of it menas:
                  You have method called *LoadAnswerGrou p* that returns void and gets as as
                  its only parmeter refernce to an object of type *AnswerGroup*. AnswerGroup
                  is declared in *Questionnaire namaspace* in *Questionnaire assembly*.
                  This in turn means that the assembly has to be called Questionnaire.d ll or
                  Questionnaire.e xe
                  CLR will look for Questionnaire assembly in the application directory, in
                  <app dir>\Questionna ire sub directory or if you have config file CLR will
                  look also in any probing directory under <app dir>.
                  Make sure this assembly exist in one of those directories.

                  I don't know why LoadAnswerGroup method looks so suspicious to you, but I
                  don't think it is the broblem. This method accept reference to AnswerGroup
                  which menas that the type has to be already loaded when you call the method.

                  CLR won't attempt to load the Questionnaire assembly until the first usage
                  of a type defined in it. So you can step in and check if you get the error
                  when the application tries to use for the very first time a type defined in
                  Questionnaire. This will give you an idea if the error is because the CLR
                  fails to load the assembly or with some particular type.

                  B\rgds
                  100

                  "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                  news:0ulab.3953 9$sd5.3649050@t wister.columbus .rr.com...[color=blue]
                  > I looked in the DLL. Everything seems correct.
                  > I looked in the application and found this:
                  > (symbol=box) method
                  > LoadAnswerGroup :void(class[Questionnaire]Questionnaire.A nswerGroup)
                  >
                  > Could this be the problem, and if so, How do I fix it?
                  >
                  > "100" <100@100.com> wrote in message
                  > news:%23oBSjNgf DHA.3896@tk2msf tngp13.phx.gbl. ..[color=green]
                  > > In my computer ILDasm is located in:
                  > > C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\B in
                  > > I believe in your too.
                  > >
                  > >
                  > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                  > > news:%2lab.3953 6$sd5.3644086@t wister.columbus .rr.com...[color=darkred]
                  > > > I add the DLL to the references of the application and just reference[/color][/color]
                  > the[color=green][color=darkred]
                  > > > classes like normal.
                  > > >
                  > > > ie:
                  > > > Survey mySurvey = new Survey();
                  > > >
                  > > > where do I find the "ILDasm tool"?
                  > > >
                  > > > "100" <100@100.com> wrote in message
                  > > > news:uOLR$9ffDH A.3204@TK2MSFTN GP11.phx.gbl...
                  > > > > Do you load the DLL assembly dynamically or the acception is thrown[/color][/color]
                  > when[color=green][color=darkred]
                  > > > you
                  > > > > try to use a type in a "normal" way?
                  > > > >
                  > > > > Anyway, what I can suggest to you is to load the dll in ILDasm tool[/color][/color]
                  > and[color=green][color=darkred]
                  > > > look
                  > > > > at the types your DLL exports and see if your type is among them.
                  > > > >
                  > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                  > > > > news:dmkab.3953 5$sd5.3635556@t wister.columbus .rr.com...
                  > > > > > Yes.
                  > > > > > The DLL was recompiled several times.
                  > > > > > In the Application project, I have even included the DLL Project[/color][/color]
                  > and[color=green][color=darkred]
                  > > > > > changed the references, still with no success.
                  > > > > >
                  > > > > > "100" <100@100.com> wrote in message
                  > > > > > news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...
                  > > > > > > Hi Jones,
                  > > > > > >
                  > > > > > > Did you recompile the DLL as well?
                  > > > > > >
                  > > > > > > B\rgds
                  > > > > > > 100
                  > > > > > >
                  > > > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                  > > > > > > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...
                  > > > > > > > I am having problems with my C# project. The project was[/color][/color][/color]
                  built[color=blue][color=green][color=darkred]
                  > > > using
                  > > > > > > VS.net
                  > > > > > > > (original release with service pack 1). The project includes
                  > > > windows
                  > > > > > > forms
                  > > > > > > > and a DLL (dot.net)
                  > > > > > > >
                  > > > > > > > After getting the application working, everything compiled and[/color][/color]
                  > was[color=green][color=darkred]
                  > > > > > > > troubleshooted. Ready for delivery, the owner decided to[/color][/color][/color]
                  change[color=blue][color=green]
                  > > the[color=darkred]
                  > > > > > Name
                  > > > > > > of
                  > > > > > > > the application and DLL.
                  > > > > > > >
                  > > > > > > > After discussing this with another developer, we decided that[/color][/color]
                  > the[color=green][color=darkred]
                  > > > > > > namespace
                  > > > > > > > in the application needed to be changed as well.
                  > > > > > > >
                  > > > > > > > I have changed Namespace name to the new name, DLL was[/color][/color][/color]
                  renamed,[color=blue][color=green]
                  > > and[color=darkred]
                  > > > > the
                  > > > > > > > application was compiled several times. With clean compiles.
                  > > > > > > >
                  > > > > > > > However, when I execute the code (in IDE or direct) the code[/color]
                  > > errors[color=darkred]
                  > > > > out
                  > > > > > > when
                  > > > > > > > it attempts to access any of the DLL classes.
                  > > > > > > >
                  > > > > > > > I have checked the references, pathing, compiling. All the[/color]
                  > > possible[color=darkred]
                  > > > > > > errors
                  > > > > > > > I could think of and all point to the New DLL name and Correct
                  > > > > > Namespace.
                  > > > > > > I
                  > > > > > > > have even checked for namespace misspellings. All have the[/color][/color][/color]
                  same[color=blue][color=green][color=darkred]
                  > > > > > spelling.
                  > > > > > > >
                  > > > > > > > Example Error Message:
                  > > > > > > > " Could not load type Questionnaire.C onfiguration from[/color][/color][/color]
                  assembly[color=blue][color=green][color=darkred]
                  > > > > > > > Questionnaire, Version=1.0.135 6.17027,
                  > > > > > > Culture=neutral ,PublicKeyToken =null,
                  > > > > > > > Questionnaire"
                  > > > > > > >
                  > > > > > > > Please Help.
                  > > > > > > >
                  > > > > > > >
                  > > > > > > >
                  > > > > > > >
                  > > > > > >
                  > > > > > >
                  > > > > >
                  > > > > >
                  > > > >
                  > > > >
                  > > >
                  > > >[/color]
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • Jones

                    #10
                    Re: newbe C# Project Question

                    "Symbol=Box " was the graphics in the ILDasm GUI.
                    The Dll is called "Questionnaire. dll"
                    It looked suspicious because I am not familiar with ILDASM or even very much
                    Dot.Net to understand what I am looking at.
                    The Error occurs at three locations in the application. All locations are
                    where the application is trying to load types from the DLL.

                    I have stepped through the code and know the types it is having problems
                    with. However, the DLL has not changed and the types have not changed. Only
                    the namespace has changed. The application seems to not be able to find the
                    DLL.

                    I don't know what else to check.

                    The reference paths include the DLL's location.
                    When I have both projects under the same solution, the DLL reference is
                    marked with "Copy Local" = True.

                    other than that, I have no clue where else to look.

                    "100" <100@100.com> wrote in message
                    news:OsFMKChfDH A.616@TK2MSFTNG P11.phx.gbl...[color=blue]
                    > Frankly, I don't know what (symbol=box) menas. Maybe sombody else can help
                    > us out with this. I haven't seen it before.
                    > Anyway the rest of it menas:
                    > You have method called *LoadAnswerGrou p* that returns void and gets as as
                    > its only parmeter refernce to an object of type *AnswerGroup*. AnswerGroup
                    > is declared in *Questionnaire namaspace* in *Questionnaire assembly*.
                    > This in turn means that the assembly has to be called Questionnaire.d ll or
                    > Questionnaire.e xe
                    > CLR will look for Questionnaire assembly in the application directory, in
                    > <app dir>\Questionna ire sub directory or if you have config file CLR will
                    > look also in any probing directory under <app dir>.
                    > Make sure this assembly exist in one of those directories.
                    >
                    > I don't know why LoadAnswerGroup method looks so suspicious to you, but I
                    > don't think it is the broblem. This method accept reference to AnswerGroup
                    > which menas that the type has to be already loaded when you call the[/color]
                    method.[color=blue]
                    >
                    > CLR won't attempt to load the Questionnaire assembly until the first usage
                    > of a type defined in it. So you can step in and check if you get the[/color]
                    error[color=blue]
                    > when the application tries to use for the very first time a type defined[/color]
                    in[color=blue]
                    > Questionnaire. This will give you an idea if the error is because the CLR
                    > fails to load the assembly or with some particular type.
                    >
                    > B\rgds
                    > 100
                    >
                    > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                    > news:0ulab.3953 9$sd5.3649050@t wister.columbus .rr.com...[color=green]
                    > > I looked in the DLL. Everything seems correct.
                    > > I looked in the application and found this:
                    > > (symbol=box) method
                    > > LoadAnswerGroup :void(class[Questionnaire]Questionnaire.A nswerGroup)
                    > >
                    > > Could this be the problem, and if so, How do I fix it?
                    > >
                    > > "100" <100@100.com> wrote in message
                    > > news:%23oBSjNgf DHA.3896@tk2msf tngp13.phx.gbl. ..[color=darkred]
                    > > > In my computer ILDasm is located in:
                    > > > C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\B in
                    > > > I believe in your too.
                    > > >
                    > > >
                    > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                    > > > news:%2lab.3953 6$sd5.3644086@t wister.columbus .rr.com...
                    > > > > I add the DLL to the references of the application and just[/color][/color][/color]
                    reference[color=blue][color=green]
                    > > the[color=darkred]
                    > > > > classes like normal.
                    > > > >
                    > > > > ie:
                    > > > > Survey mySurvey = new Survey();
                    > > > >
                    > > > > where do I find the "ILDasm tool"?
                    > > > >
                    > > > > "100" <100@100.com> wrote in message
                    > > > > news:uOLR$9ffDH A.3204@TK2MSFTN GP11.phx.gbl...
                    > > > > > Do you load the DLL assembly dynamically or the acception is[/color][/color][/color]
                    thrown[color=blue][color=green]
                    > > when[color=darkred]
                    > > > > you
                    > > > > > try to use a type in a "normal" way?
                    > > > > >
                    > > > > > Anyway, what I can suggest to you is to load the dll in ILDasm[/color][/color][/color]
                    tool[color=blue][color=green]
                    > > and[color=darkred]
                    > > > > look
                    > > > > > at the types your DLL exports and see if your type is among them.
                    > > > > >
                    > > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                    > > > > > news:dmkab.3953 5$sd5.3635556@t wister.columbus .rr.com...
                    > > > > > > Yes.
                    > > > > > > The DLL was recompiled several times.
                    > > > > > > In the Application project, I have even included the DLL[/color][/color][/color]
                    Project[color=blue][color=green]
                    > > and[color=darkred]
                    > > > > > > changed the references, still with no success.
                    > > > > > >
                    > > > > > > "100" <100@100.com> wrote in message
                    > > > > > > news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...
                    > > > > > > > Hi Jones,
                    > > > > > > >
                    > > > > > > > Did you recompile the DLL as well?
                    > > > > > > >
                    > > > > > > > B\rgds
                    > > > > > > > 100
                    > > > > > > >
                    > > > > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                    > > > > > > > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...
                    > > > > > > > > I am having problems with my C# project. The project was[/color][/color]
                    > built[color=green][color=darkred]
                    > > > > using
                    > > > > > > > VS.net
                    > > > > > > > > (original release with service pack 1). The project[/color][/color][/color]
                    includes[color=blue][color=green][color=darkred]
                    > > > > windows
                    > > > > > > > forms
                    > > > > > > > > and a DLL (dot.net)
                    > > > > > > > >
                    > > > > > > > > After getting the application working, everything compiled[/color][/color][/color]
                    and[color=blue][color=green]
                    > > was[color=darkred]
                    > > > > > > > > troubleshooted. Ready for delivery, the owner decided to[/color][/color]
                    > change[color=green][color=darkred]
                    > > > the
                    > > > > > > Name
                    > > > > > > > of
                    > > > > > > > > the application and DLL.
                    > > > > > > > >
                    > > > > > > > > After discussing this with another developer, we decided[/color][/color][/color]
                    that[color=blue][color=green]
                    > > the[color=darkred]
                    > > > > > > > namespace
                    > > > > > > > > in the application needed to be changed as well.
                    > > > > > > > >
                    > > > > > > > > I have changed Namespace name to the new name, DLL was[/color][/color]
                    > renamed,[color=green][color=darkred]
                    > > > and
                    > > > > > the
                    > > > > > > > > application was compiled several times. With clean compiles.
                    > > > > > > > >
                    > > > > > > > > However, when I execute the code (in IDE or direct) the code
                    > > > errors
                    > > > > > out
                    > > > > > > > when
                    > > > > > > > > it attempts to access any of the DLL classes.
                    > > > > > > > >
                    > > > > > > > > I have checked the references, pathing, compiling. All the
                    > > > possible
                    > > > > > > > errors
                    > > > > > > > > I could think of and all point to the New DLL name and[/color][/color][/color]
                    Correct[color=blue][color=green][color=darkred]
                    > > > > > > Namespace.
                    > > > > > > > I
                    > > > > > > > > have even checked for namespace misspellings. All have the[/color][/color]
                    > same[color=green][color=darkred]
                    > > > > > > spelling.
                    > > > > > > > >
                    > > > > > > > > Example Error Message:
                    > > > > > > > > " Could not load type Questionnaire.C onfiguration from[/color][/color]
                    > assembly[color=green][color=darkred]
                    > > > > > > > > Questionnaire, Version=1.0.135 6.17027,
                    > > > > > > > Culture=neutral ,PublicKeyToken =null,
                    > > > > > > > > Questionnaire"
                    > > > > > > > >
                    > > > > > > > > Please Help.
                    > > > > > > > >
                    > > > > > > > >
                    > > > > > > > >
                    > > > > > > > >
                    > > > > > > >
                    > > > > > > >
                    > > > > > >
                    > > > > > >
                    > > > > >
                    > > > > >
                    > > > >
                    > > > >
                    > > >
                    > > >[/color]
                    > >
                    > >[/color]
                    >
                    >[/color]


                    Comment

                    • 100

                      #11
                      Re: newbe C# Project Question

                      Jones,
                      I did some tests and I got FileNotFoundExc eption if the CLR cannot locate
                      the assembly. If you had misspelled the namespace you had had compile time
                      error messages.
                      The only way I could get the TypeLoadExcepti on is when I did the following
                      1. I created application (exe) and library (dll)
                      2. The application uses class exported by the dll.
                      3. I changed the name of the type the dll exports (changing the namespace)
                      4. Recompiled the dll only. the exe remains the same.
                      5.Copied the dll in the application directory and run the application.

                      So what we have now is the old application which tries to import the type
                      form the dll. Dll has the same name version (it is not strong named) so CLR
                      loads it. However the type that the application tries to import doesn't
                      exist anymore and LoadTypeExcepti ons is thrown.

                      So I think this is your problem. Some way or another your application still
                      use the old dll. It compiles ok because you have provided the right path in
                      the references to the new dll (or project). However IDE fails to copy the
                      dll in the application direcotry.

                      Try the folowing. Recompile the new application and dll. Open the explorer
                      and copy the dll form
                      <dll project dir>\bin\debug (or release if you compile in release version)
                      and the <exe project dir>\bin\debug (or release) to a some new directory and
                      try to run the application form this new location. If it needs other
                      assemblies make sure to copy in the same directory latest copies of these
                      assemblies.

                      The same problem may occur if the dll referenced third assemblies and you
                      have the old version of it in the application directory and so on.

                      So the point is that when you start the Application it doesn't use what you
                      specified in the project references. It uses what is in the application
                      directory or sub directories (in case of not strongly named assemblies).

                      This is the role of Copy Local = true. the IDE has to copy the referenced
                      dll in the application directory. However, it may fail if the dll is
                      currently in use and the IDE won't tell anything. Try to delete the dll from
                      the application directory to check if the dll can be overwritten.

                      HTH

                      "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                      news:9Nmab.3954 0$sd5.3661866@t wister.columbus .rr.com...[color=blue]
                      > "Symbol=Box " was the graphics in the ILDasm GUI.
                      > The Dll is called "Questionnaire. dll"
                      > It looked suspicious because I am not familiar with ILDASM or even very[/color]
                      much[color=blue]
                      > Dot.Net to understand what I am looking at.
                      > The Error occurs at three locations in the application. All locations are
                      > where the application is trying to load types from the DLL.
                      >
                      > I have stepped through the code and know the types it is having problems
                      > with. However, the DLL has not changed and the types have not changed.[/color]
                      Only[color=blue]
                      > the namespace has changed. The application seems to not be able to find[/color]
                      the[color=blue]
                      > DLL.
                      >
                      > I don't know what else to check.
                      >
                      > The reference paths include the DLL's location.
                      > When I have both projects under the same solution, the DLL reference is
                      > marked with "Copy Local" = True.
                      >
                      > other than that, I have no clue where else to look.
                      >
                      > "100" <100@100.com> wrote in message
                      > news:OsFMKChfDH A.616@TK2MSFTNG P11.phx.gbl...[color=green]
                      > > Frankly, I don't know what (symbol=box) menas. Maybe sombody else can[/color][/color]
                      help[color=blue][color=green]
                      > > us out with this. I haven't seen it before.
                      > > Anyway the rest of it menas:
                      > > You have method called *LoadAnswerGrou p* that returns void and gets as[/color][/color]
                      as[color=blue][color=green]
                      > > its only parmeter refernce to an object of type *AnswerGroup*.[/color][/color]
                      AnswerGroup[color=blue][color=green]
                      > > is declared in *Questionnaire namaspace* in *Questionnaire assembly*.
                      > > This in turn means that the assembly has to be called Questionnaire.d ll[/color][/color]
                      or[color=blue][color=green]
                      > > Questionnaire.e xe
                      > > CLR will look for Questionnaire assembly in the application directory,[/color][/color]
                      in[color=blue][color=green]
                      > > <app dir>\Questionna ire sub directory or if you have config file CLR[/color][/color]
                      will[color=blue][color=green]
                      > > look also in any probing directory under <app dir>.
                      > > Make sure this assembly exist in one of those directories.
                      > >
                      > > I don't know why LoadAnswerGroup method looks so suspicious to you, but[/color][/color]
                      I[color=blue][color=green]
                      > > don't think it is the broblem. This method accept reference to[/color][/color]
                      AnswerGroup[color=blue][color=green]
                      > > which menas that the type has to be already loaded when you call the[/color]
                      > method.[color=green]
                      > >
                      > > CLR won't attempt to load the Questionnaire assembly until the first[/color][/color]
                      usage[color=blue][color=green]
                      > > of a type defined in it. So you can step in and check if you get the[/color]
                      > error[color=green]
                      > > when the application tries to use for the very first time a type defined[/color]
                      > in[color=green]
                      > > Questionnaire. This will give you an idea if the error is because the[/color][/color]
                      CLR[color=blue][color=green]
                      > > fails to load the assembly or with some particular type.
                      > >
                      > > B\rgds
                      > > 100
                      > >
                      > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                      > > news:0ulab.3953 9$sd5.3649050@t wister.columbus .rr.com...[color=darkred]
                      > > > I looked in the DLL. Everything seems correct.
                      > > > I looked in the application and found this:
                      > > > (symbol=box) method
                      > > > LoadAnswerGroup :void(class[Questionnaire]Questionnaire.A nswerGroup)
                      > > >
                      > > > Could this be the problem, and if so, How do I fix it?
                      > > >
                      > > > "100" <100@100.com> wrote in message
                      > > > news:%23oBSjNgf DHA.3896@tk2msf tngp13.phx.gbl. ..
                      > > > > In my computer ILDasm is located in:
                      > > > > C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\B in
                      > > > > I believe in your too.
                      > > > >
                      > > > >
                      > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                      > > > > news:%2lab.3953 6$sd5.3644086@t wister.columbus .rr.com...
                      > > > > > I add the DLL to the references of the application and just[/color][/color]
                      > reference[color=green][color=darkred]
                      > > > the
                      > > > > > classes like normal.
                      > > > > >
                      > > > > > ie:
                      > > > > > Survey mySurvey = new Survey();
                      > > > > >
                      > > > > > where do I find the "ILDasm tool"?
                      > > > > >
                      > > > > > "100" <100@100.com> wrote in message
                      > > > > > news:uOLR$9ffDH A.3204@TK2MSFTN GP11.phx.gbl...
                      > > > > > > Do you load the DLL assembly dynamically or the acception is[/color][/color]
                      > thrown[color=green][color=darkred]
                      > > > when
                      > > > > > you
                      > > > > > > try to use a type in a "normal" way?
                      > > > > > >
                      > > > > > > Anyway, what I can suggest to you is to load the dll in ILDasm[/color][/color]
                      > tool[color=green][color=darkred]
                      > > > and
                      > > > > > look
                      > > > > > > at the types your DLL exports and see if your type is among[/color][/color][/color]
                      them.[color=blue][color=green][color=darkred]
                      > > > > > >
                      > > > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                      > > > > > > news:dmkab.3953 5$sd5.3635556@t wister.columbus .rr.com...
                      > > > > > > > Yes.
                      > > > > > > > The DLL was recompiled several times.
                      > > > > > > > In the Application project, I have even included the DLL[/color][/color]
                      > Project[color=green][color=darkred]
                      > > > and
                      > > > > > > > changed the references, still with no success.
                      > > > > > > >
                      > > > > > > > "100" <100@100.com> wrote in message
                      > > > > > > > news:ezrZHpffDH A.556@TK2MSFTNG P11.phx.gbl...
                      > > > > > > > > Hi Jones,
                      > > > > > > > >
                      > > > > > > > > Did you recompile the DLL as well?
                      > > > > > > > >
                      > > > > > > > > B\rgds
                      > > > > > > > > 100
                      > > > > > > > >
                      > > > > > > > > "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                      > > > > > > > > news:_6kab.3953 4$sd5.3633702@t wister.columbus .rr.com...
                      > > > > > > > > > I am having problems with my C# project. The project was[/color]
                      > > built[color=darkred]
                      > > > > > using
                      > > > > > > > > VS.net
                      > > > > > > > > > (original release with service pack 1). The project[/color][/color]
                      > includes[color=green][color=darkred]
                      > > > > > windows
                      > > > > > > > > forms
                      > > > > > > > > > and a DLL (dot.net)
                      > > > > > > > > >
                      > > > > > > > > > After getting the application working, everything compiled[/color][/color]
                      > and[color=green][color=darkred]
                      > > > was
                      > > > > > > > > > troubleshooted. Ready for delivery, the owner decided to[/color]
                      > > change[color=darkred]
                      > > > > the
                      > > > > > > > Name
                      > > > > > > > > of
                      > > > > > > > > > the application and DLL.
                      > > > > > > > > >
                      > > > > > > > > > After discussing this with another developer, we decided[/color][/color]
                      > that[color=green][color=darkred]
                      > > > the
                      > > > > > > > > namespace
                      > > > > > > > > > in the application needed to be changed as well.
                      > > > > > > > > >
                      > > > > > > > > > I have changed Namespace name to the new name, DLL was[/color]
                      > > renamed,[color=darkred]
                      > > > > and
                      > > > > > > the
                      > > > > > > > > > application was compiled several times. With clean[/color][/color][/color]
                      compiles.[color=blue][color=green][color=darkred]
                      > > > > > > > > >
                      > > > > > > > > > However, when I execute the code (in IDE or direct) the[/color][/color][/color]
                      code[color=blue][color=green][color=darkred]
                      > > > > errors
                      > > > > > > out
                      > > > > > > > > when
                      > > > > > > > > > it attempts to access any of the DLL classes.
                      > > > > > > > > >
                      > > > > > > > > > I have checked the references, pathing, compiling. All[/color][/color][/color]
                      the[color=blue][color=green][color=darkred]
                      > > > > possible
                      > > > > > > > > errors
                      > > > > > > > > > I could think of and all point to the New DLL name and[/color][/color]
                      > Correct[color=green][color=darkred]
                      > > > > > > > Namespace.
                      > > > > > > > > I
                      > > > > > > > > > have even checked for namespace misspellings. All have[/color][/color][/color]
                      the[color=blue][color=green]
                      > > same[color=darkred]
                      > > > > > > > spelling.
                      > > > > > > > > >
                      > > > > > > > > > Example Error Message:
                      > > > > > > > > > " Could not load type Questionnaire.C onfiguration from[/color]
                      > > assembly[color=darkred]
                      > > > > > > > > > Questionnaire, Version=1.0.135 6.17027,
                      > > > > > > > > Culture=neutral ,PublicKeyToken =null,
                      > > > > > > > > > Questionnaire"
                      > > > > > > > > >
                      > > > > > > > > > Please Help.
                      > > > > > > > > >
                      > > > > > > > > >
                      > > > > > > > > >
                      > > > > > > > > >
                      > > > > > > > >
                      > > > > > > > >
                      > > > > > > >
                      > > > > > > >
                      > > > > > >
                      > > > > > >
                      > > > > >
                      > > > > >
                      > > > >
                      > > > >
                      > > >
                      > > >[/color]
                      > >
                      > >[/color]
                      >
                      >[/color]


                      Comment

                      • Jones

                        #12
                        Re: newbe C# Project Question

                        I tried the suggestions,
                        I compiled each project. Copied each assembly (exe and DLL) to a new
                        directory and ran the application. Still getting the same errors.
                        Any other possible help?


                        "100" <100@100.com> wrote in message
                        news:%23oRIG4hf DHA.392@TK2MSFT NGP12.phx.gbl.. .[color=blue]
                        > Jones,
                        > I did some tests and I got FileNotFoundExc eption if the CLR cannot locate
                        > the assembly. If you had misspelled the namespace you had had compile time
                        > error messages.
                        > The only way I could get the TypeLoadExcepti on is when I did the following
                        > 1. I created application (exe) and library (dll)
                        > 2. The application uses class exported by the dll.
                        > 3. I changed the name of the type the dll exports (changing the namespace)
                        > 4. Recompiled the dll only. the exe remains the same.
                        > 5.Copied the dll in the application directory and run the application.
                        >
                        > So what we have now is the old application which tries to import the type
                        > form the dll. Dll has the same name version (it is not strong named) so[/color]
                        CLR[color=blue]
                        > loads it. However the type that the application tries to import doesn't
                        > exist anymore and LoadTypeExcepti ons is thrown.
                        >
                        > So I think this is your problem. Some way or another your application[/color]
                        still[color=blue]
                        > use the old dll. It compiles ok because you have provided the right path[/color]
                        in[color=blue]
                        > the references to the new dll (or project). However IDE fails to copy the
                        > dll in the application direcotry.
                        >
                        > Try the folowing. Recompile the new application and dll. Open the explorer
                        > and copy the dll form
                        > <dll project dir>\bin\debug (or release if you compile in release version)
                        > and the <exe project dir>\bin\debug (or release) to a some new directory[/color]
                        and[color=blue]
                        > try to run the application form this new location. If it needs other
                        > assemblies make sure to copy in the same directory latest copies of these
                        > assemblies.
                        >
                        > The same problem may occur if the dll referenced third assemblies and you
                        > have the old version of it in the application directory and so on.
                        >
                        > So the point is that when you start the Application it doesn't use what[/color]
                        you[color=blue]
                        > specified in the project references. It uses what is in the application
                        > directory or sub directories (in case of not strongly named assemblies).
                        >
                        > This is the role of Copy Local = true. the IDE has to copy the referenced
                        > dll in the application directory. However, it may fail if the dll is
                        > currently in use and the IDE won't tell anything. Try to delete the dll[/color]
                        from[color=blue]
                        > the application directory to check if the dll can be overwritten.
                        >
                        > HTH
                        >[/color]


                        Comment

                        • 100

                          #13
                          Re: newbe C# Project Question

                          Wow, no more ideas ;(
                          If you have time and you can reproduce the same in a test project you can
                          send it to me. I'll try to find what the problem is. My email address is
                          *sgoutsev<?>dro meydesign.com* just repalce <?> with @
                          What I can say is that CLR finds the DLL and loads it, but the a type is not
                          in the DLL.

                          B\rgds
                          100
                          "Jones" <noemail.cpsi@i nsight.rr.com> wrote in message
                          news:NlFbb.4840 0$sd5.4843821@t wister.columbus .rr.com...[color=blue]
                          > I tried the suggestions,
                          > I compiled each project. Copied each assembly (exe and DLL) to a new
                          > directory and ran the application. Still getting the same errors.
                          > Any other possible help?
                          >
                          >
                          > "100" <100@100.com> wrote in message
                          > news:%23oRIG4hf DHA.392@TK2MSFT NGP12.phx.gbl.. .[color=green]
                          > > Jones,
                          > > I did some tests and I got FileNotFoundExc eption if the CLR cannot[/color][/color]
                          locate[color=blue][color=green]
                          > > the assembly. If you had misspelled the namespace you had had compile[/color][/color]
                          time[color=blue][color=green]
                          > > error messages.
                          > > The only way I could get the TypeLoadExcepti on is when I did the[/color][/color]
                          following[color=blue][color=green]
                          > > 1. I created application (exe) and library (dll)
                          > > 2. The application uses class exported by the dll.
                          > > 3. I changed the name of the type the dll exports (changing the[/color][/color]
                          namespace)[color=blue][color=green]
                          > > 4. Recompiled the dll only. the exe remains the same.
                          > > 5.Copied the dll in the application directory and run the application.
                          > >
                          > > So what we have now is the old application which tries to import the[/color][/color]
                          type[color=blue][color=green]
                          > > form the dll. Dll has the same name version (it is not strong named) so[/color]
                          > CLR[color=green]
                          > > loads it. However the type that the application tries to import doesn't
                          > > exist anymore and LoadTypeExcepti ons is thrown.
                          > >
                          > > So I think this is your problem. Some way or another your application[/color]
                          > still[color=green]
                          > > use the old dll. It compiles ok because you have provided the right path[/color]
                          > in[color=green]
                          > > the references to the new dll (or project). However IDE fails to copy[/color][/color]
                          the[color=blue][color=green]
                          > > dll in the application direcotry.
                          > >
                          > > Try the folowing. Recompile the new application and dll. Open the[/color][/color]
                          explorer[color=blue][color=green]
                          > > and copy the dll form
                          > > <dll project dir>\bin\debug (or release if you compile in release[/color][/color]
                          version)[color=blue][color=green]
                          > > and the <exe project dir>\bin\debug (or release) to a some new directory[/color]
                          > and[color=green]
                          > > try to run the application form this new location. If it needs other
                          > > assemblies make sure to copy in the same directory latest copies of[/color][/color]
                          these[color=blue][color=green]
                          > > assemblies.
                          > >
                          > > The same problem may occur if the dll referenced third assemblies and[/color][/color]
                          you[color=blue][color=green]
                          > > have the old version of it in the application directory and so on.
                          > >
                          > > So the point is that when you start the Application it doesn't use what[/color]
                          > you[color=green]
                          > > specified in the project references. It uses what is in the application
                          > > directory or sub directories (in case of not strongly named assemblies).
                          > >
                          > > This is the role of Copy Local = true. the IDE has to copy the[/color][/color]
                          referenced[color=blue][color=green]
                          > > dll in the application directory. However, it may fail if the dll is
                          > > currently in use and the IDE won't tell anything. Try to delete the dll[/color]
                          > from[color=green]
                          > > the application directory to check if the dll can be overwritten.
                          > >
                          > > HTH
                          > >[/color]
                          >
                          >[/color]


                          Comment

                          Working...