473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.Configuration from assembly
Questionnaire, Version=1.0.1356.17027, Culture=neutral,PublicKeyToken=null,
Questionnaire"

Please Help.


Nov 15 '05 #1
12 1626
100
Hi Jones,

Did you recompile the DLL as well?

B\rgds
100

"Jones" <no**********@insight.rr.com> wrote in message
news:_6*********************@twister.columbus.rr.c om...
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.Configuration from assembly
Questionnaire, Version=1.0.1356.17027, Culture=neutral,PublicKeyToken=null, Questionnaire"

Please Help.

Nov 15 '05 #2
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" <10*@100.com> wrote in message
news:ez*************@TK2MSFTNGP11.phx.gbl...
Hi Jones,

Did you recompile the DLL as well?

B\rgds
100

"Jones" <no**********@insight.rr.com> wrote in message
news:_6*********************@twister.columbus.rr.c om...
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.Configuration from assembly
Questionnaire, Version=1.0.1356.17027,

Culture=neutral,PublicKeyToken=null,
Questionnaire"

Please Help.


Nov 15 '05 #3
100
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" <no**********@insight.rr.com> wrote in message
news:dm*********************@twister.columbus.rr.c om...
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" <10*@100.com> wrote in message
news:ez*************@TK2MSFTNGP11.phx.gbl...
Hi Jones,

Did you recompile the DLL as well?

B\rgds
100

"Jones" <no**********@insight.rr.com> wrote in message
news:_6*********************@twister.columbus.rr.c om...
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.Configuration from assembly
Questionnaire, Version=1.0.1356.17027,

Culture=neutral,PublicKeyToken=null,
Questionnaire"

Please Help.



Nov 15 '05 #4
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" <10*@100.com> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
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" <no**********@insight.rr.com> wrote in message
news:dm*********************@twister.columbus.rr.c om...
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" <10*@100.com> wrote in message
news:ez*************@TK2MSFTNGP11.phx.gbl...
Hi Jones,

Did you recompile the DLL as well?

B\rgds
100

"Jones" <no**********@insight.rr.com> wrote in message
news:_6*********************@twister.columbus.rr.c om...
> 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.Configuration from assembly
> Questionnaire, Version=1.0.1356.17027,
Culture=neutral,PublicKeyToken=null,
> Questionnaire"
>
> Please Help.
>
>
>
>



Nov 15 '05 #5
100
In my computer ILDasm is located in:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
I believe in your too.
"Jones" <no**********@insight.rr.com> wrote in message
news:%2*********************@twister.columbus.rr.c om...
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" <10*@100.com> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
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" <no**********@insight.rr.com> wrote in message
news:dm*********************@twister.columbus.rr.c om...
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" <10*@100.com> wrote in message
news:ez*************@TK2MSFTNGP11.phx.gbl...
> Hi Jones,
>
> Did you recompile the DLL as well?
>
> B\rgds
> 100
>
> "Jones" <no**********@insight.rr.com> wrote in message
> news:_6*********************@twister.columbus.rr.c om...
> > 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.Configuration from assembly
> > Questionnaire, Version=1.0.1356.17027,
> Culture=neutral,PublicKeyToken=null,
> > Questionnaire"
> >
> > Please Help.
> >
> >
> >
> >
>
>



Nov 15 '05 #6
or just go to Visual Studio Command Prompt and type "ildasm"

100 wrote:
In my computer ILDasm is located in:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
I believe in your too.
"Jones" <no**********@insight.rr.com> wrote in message
news:%2*********************@twister.columbus.rr. com...

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" <10*@100.com> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...

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" <no**********@insight.rr.com> wrote in message
news:dm*********************@twister.columbus.r r.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" <10*@100.com> wrote in message
news:ez*************@TK2MSFTNGP11.phx.gbl...
>Hi Jones,
>
>Did you recompile the DLL as well?
>
>B\rgds
>100
>
>"Jones" <no**********@insight.rr.com> wrote in message
>news:_6*********************@twister.columbus .rr.com...
>
>
>>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.Configuration from assembly
>>Questionnaire, Version=1.0.1356.17027,
>>
>>
>Culture=neutral,PublicKeyToken=null,
>
>
>>Questionnaire"
>>
>>Please Help.
>>
>>
>>
>>
>>
>>
>
>




Nov 15 '05 #7
I looked in the DLL. Everything seems correct.
I looked in the application and found this:
(symbol=box) method
LoadAnswerGroup:void(class[Questionnaire]Questionnaire.AnswerGroup)

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

"100" <10*@100.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my computer ILDasm is located in:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
I believe in your too.
"Jones" <no**********@insight.rr.com> wrote in message
news:%2*********************@twister.columbus.rr.c om...
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" <10*@100.com> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
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" <no**********@insight.rr.com> wrote in message
news:dm*********************@twister.columbus.rr.c om...
> 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" <10*@100.com> wrote in message
> news:ez*************@TK2MSFTNGP11.phx.gbl...
> > Hi Jones,
> >
> > Did you recompile the DLL as well?
> >
> > B\rgds
> > 100
> >
> > "Jones" <no**********@insight.rr.com> wrote in message
> > news:_6*********************@twister.columbus.rr.c om...
> > > 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.Configuration from assembly
> > > Questionnaire, Version=1.0.1356.17027,
> > Culture=neutral,PublicKeyToken=null,
> > > Questionnaire"
> > >
> > > Please Help.
> > >
> > >
> > >
> > >
> >
> >
>
>



Nov 15 '05 #8
100
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 *LoadAnswerGroup* 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.dll or
Questionnaire.exe
CLR will look for Questionnaire assembly in the application directory, in
<app dir>\Questionnaire 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" <no**********@insight.rr.com> wrote in message
news:0u*********************@twister.columbus.rr.c om...
I looked in the DLL. Everything seems correct.
I looked in the application and found this:
(symbol=box) method
LoadAnswerGroup:void(class[Questionnaire]Questionnaire.AnswerGroup)

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

"100" <10*@100.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my computer ILDasm is located in:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
I believe in your too.
"Jones" <no**********@insight.rr.com> wrote in message
news:%2*********************@twister.columbus.rr.c om...
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" <10*@100.com> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
> 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" <no**********@insight.rr.com> wrote in message
> news:dm*********************@twister.columbus.rr.c om...
> > 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" <10*@100.com> wrote in message
> > news:ez*************@TK2MSFTNGP11.phx.gbl...
> > > Hi Jones,
> > >
> > > Did you recompile the DLL as well?
> > >
> > > B\rgds
> > > 100
> > >
> > > "Jones" <no**********@insight.rr.com> wrote in message
> > > news:_6*********************@twister.columbus.rr.c om...
> > > > 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.Configuration from assembly > > > > Questionnaire, Version=1.0.1356.17027,
> > > Culture=neutral,PublicKeyToken=null,
> > > > Questionnaire"
> > > >
> > > > Please Help.
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 15 '05 #9
"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" <10*@100.com> wrote in message
news:Os*************@TK2MSFTNGP11.phx.gbl...
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 *LoadAnswerGroup* 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.dll or
Questionnaire.exe
CLR will look for Questionnaire assembly in the application directory, in
<app dir>\Questionnaire 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" <no**********@insight.rr.com> wrote in message
news:0u*********************@twister.columbus.rr.c om...
I looked in the DLL. Everything seems correct.
I looked in the application and found this:
(symbol=box) method
LoadAnswerGroup:void(class[Questionnaire]Questionnaire.AnswerGroup)

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

"100" <10*@100.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my computer ILDasm is located in:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
I believe in your too.
"Jones" <no**********@insight.rr.com> wrote in message
news:%2*********************@twister.columbus.rr.c om...
> 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" <10*@100.com> wrote in message
> news:uO**************@TK2MSFTNGP11.phx.gbl...
> > 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" <no**********@insight.rr.com> wrote in message
> > news:dm*********************@twister.columbus.rr.c om...
> > > 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" <10*@100.com> wrote in message
> > > news:ez*************@TK2MSFTNGP11.phx.gbl...
> > > > Hi Jones,
> > > >
> > > > Did you recompile the DLL as well?
> > > >
> > > > B\rgds
> > > > 100
> > > >
> > > > "Jones" <no**********@insight.rr.com> wrote in message
> > > > news:_6*********************@twister.columbus.rr.c om...
> > > > > 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.Configuration from assembly > > > > > Questionnaire, Version=1.0.1356.17027,
> > > > Culture=neutral,PublicKeyToken=null,
> > > > > Questionnaire"
> > > > >
> > > > > Please Help.
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 15 '05 #10
100
Jones,
I did some tests and I got FileNotFoundException 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 TypeLoadException 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 LoadTypeExceptions 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" <no**********@insight.rr.com> wrote in message
news:9N*********************@twister.columbus.rr.c om...
"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" <10*@100.com> wrote in message
news:Os*************@TK2MSFTNGP11.phx.gbl...
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 *LoadAnswerGroup* 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.dll or Questionnaire.exe
CLR will look for Questionnaire assembly in the application directory, in <app dir>\Questionnaire 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" <no**********@insight.rr.com> wrote in message
news:0u*********************@twister.columbus.rr.c om...
I looked in the DLL. Everything seems correct.
I looked in the application and found this:
(symbol=box) method
LoadAnswerGroup:void(class[Questionnaire]Questionnaire.AnswerGroup)

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

"100" <10*@100.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> In my computer ILDasm is located in:
> C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
> I believe in your too.
>
>
> "Jones" <no**********@insight.rr.com> wrote in message
> news:%2*********************@twister.columbus.rr.c om...
> > 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" <10*@100.com> wrote in message
> > news:uO**************@TK2MSFTNGP11.phx.gbl...
> > > 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" <no**********@insight.rr.com> wrote in message
> > > news:dm*********************@twister.columbus.rr.c om...
> > > > 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" <10*@100.com> wrote in message
> > > > news:ez*************@TK2MSFTNGP11.phx.gbl...
> > > > > Hi Jones,
> > > > >
> > > > > Did you recompile the DLL as well?
> > > > >
> > > > > B\rgds
> > > > > 100
> > > > >
> > > > > "Jones" <no**********@insight.rr.com> wrote in message
> > > > > news:_6*********************@twister.columbus.rr.c om...
> > > > > > 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.Configuration from

assembly
> > > > > > Questionnaire, Version=1.0.1356.17027,
> > > > > Culture=neutral,PublicKeyToken=null,
> > > > > > Questionnaire"
> > > > > >
> > > > > > Please Help.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 15 '05 #11
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" <10*@100.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Jones,
I did some tests and I got FileNotFoundException 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 TypeLoadException 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 LoadTypeExceptions 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

Nov 15 '05 #12
100
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<?>dromeydesign.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" <no**********@insight.rr.com> wrote in message
news:Nl*********************@twister.columbus.rr.c om...
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" <10*@100.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Jones,
I did some tests and I got FileNotFoundException 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 TypeLoadException 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 LoadTypeExceptions 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


Nov 15 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: MikeP | last post by:
Hello, I am planning on going head first into C++.I have programmed in VB and still work with php regularly.Should I pursue Microsoft's implementation of C++( That being C++.net) or just learn it...
7
by: Jean Pierre Daviau | last post by:
Hi, <script language="javascript" type="text/javascript"> if(navigator.appName.indexOf("Netscape") != -1){ document.writeln('<link rel="stylesheet" href="~styles/aquarelle_ns.css"...
9
by: Yaro | last post by:
Hello DB2/NT 8.1.3 Sorry for stupid questions. I am newbe in DB2. 1. How can I read *.sql script (with table and function definitions) into a database? Tool, command... 2. In Project Center...
1
by: Daniel Bello Urizarri | last post by:
Hello: Im creating a web site that uses a class with some mehods, when the web application starts, it can not find the external dll. Where should it be placed?
1
by: Jim | last post by:
I have created a windows form that contains several tab pages which contain a panels. On a tab page I am trying to dynamically create a series of buttons in that pages panel. I am failing because...
3
by: Kostas Kousinovalis | last post by:
Hello Is it so difficult to make a databound form or am I somewhere wrong? First I create a SQL DataAdapter with a connection to Northwid Products VB creates a SQLConnection1 Then I'm...
19
by: AMP | last post by:
I have a simple question. If i have a button on form1 that creates : Form2 newform = new Form2(); newform.Show(); As I click the button a new form shows,but acording to my code each one has...
3
by: Executor | last post by:
I have created a user control which I would like to use in other projects. When I try to create an instance on a form in an other project I get an error message. This is the AssemblyInfo.cs of...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.