DLLHELL back again?

R

Rudy Meijer

Hello,

I have created a simple "Hello World" Console apllication on laptop A.
The application is created with CSharp Express beta 2, built for
framework 2.0 and runs perfect on laptop A.

When I copy the apllication to laptop B, I get the following error on
run:

"This application has failed to start because the application
configuration is incorrect. Reinstalling the application may fix this
problem."

Additional info in System Event Log: Source=SideBySide

"Syntax error in manifest or policy file "C:\Test\HelloWorld.exe" on
line 3. The required attribute type is missing from element
assemblyIdentity."

First i thougth that Framework 2.0 on laptop B was corrupted but other
applications, built with VS2005, run perfect on laptop B.

Both laptops are almost new and have a clean installation:
Configuration laptop A: XP home, CSharp Express 2008 beta 2, Framework
2.0, 3.0 and 3.5
Configuration laptop B: XP prof, VS 2003 EA, Framework 1.1 and 2.0
(redist dotnetfx20.exe)

Do you have an idea why the application doesn't run on laptop B?
M.v.g.

Rudy Meijer
 
N

Nicholas Paldino [.NET/C# MVP]

Rudy,

Well, you are compiling with a beta version of software with possibly
(and I know you said you targeted 2.0) which might not be targeting the
correct version of the framework.

If you compile your project in VS.NET 2005, a non-beta edition, does it
work?
 
R

Rudy Meijer

Rudy,

Well, you are compiling with a beta version of software with possibly
(and I know you said you targeted 2.0) which might not be targeting the
correct version of the framework.

If you compile your project in VS.NET 2005, a non-beta edition, does it
work?

Yes, when i compile "Hello World" with VS2005 on laptop C it runs on
laptop B.
When i compile "Hello World" on laptop A, it runs on laptop C but not
on laptop B.

Configuration laptop C: XP prof, VS2005
 
W

Willy Denoyette [MVP]

Rudy Meijer said:
Hello,

I have created a simple "Hello World" Console apllication on laptop A.
The application is created with CSharp Express beta 2, built for
framework 2.0 and runs perfect on laptop A.

When I copy the apllication to laptop B, I get the following error on
run:

"This application has failed to start because the application
configuration is incorrect. Reinstalling the application may fix this
problem."

Additional info in System Event Log: Source=SideBySide

"Syntax error in manifest or policy file "C:\Test\HelloWorld.exe" on
line 3. The required attribute type is missing from element
assemblyIdentity."

First i thougth that Framework 2.0 on laptop B was corrupted but other
applications, built with VS2005, run perfect on laptop B.

Both laptops are almost new and have a clean installation:
Configuration laptop A: XP home, CSharp Express 2008 beta 2, Framework
2.0, 3.0 and 3.5
Configuration laptop B: XP prof, VS 2003 EA, Framework 1.1 and 2.0
(redist dotnetfx20.exe)

Do you have an idea why the application doesn't run on laptop B?
M.v.g.

Rudy Meijer


That's an indication that you are targeting the wrong Framework version.
Make sure you are targeting Framework V2 in your project setting, the
default is AFAIK V3.5.

Willy.
 
R

Rudy Meijer

That's an indication that you are targeting the wrong Framework version.
Make sure you are targeting Framework V2 in your project setting, the
default is AFAIK V3.5.

Willy.

Thats correct. The default is V3.5 but I did change this to v2.0 in
the project settings for the "Hello World" appl. So the appl. is
targeting v2.0.

Rudy
 
W

Willy Denoyette [MVP]

Rudy Meijer said:
Thats correct. The default is V3.5 but I did change this to v2.0 in
the project settings for the "Hello World" appl. So the appl. is
targeting v2.0.

Rudy


Try to build your project without embedded manifest (project settings -
Application), or if you have the SDK installed run MT [1] to extract the
manifest from the exe and look what's on line 3.

mt.exe -managedassemblyname:your.exe -out:manifest.txt
when done inspect the manifest.txt

Willy.
 
C

Cor Ligthert[MVP]

Rudy,

When I look at the answers on your question, I only can give you one aswer,
in my opinion you are right, Microsoft has failed to make from .Net a
version independent platform even inside the windows environment.

With version 1.0 to version 1.1 it was going right, after that it looks like
the DLL hell again., 1.1 was backwards compatible to 1.0. In my opinion it
becomes time again that they have a look at these failures more than
creating all kind of gadgets.

Just my opinion.

Cor
 
W

Willy Denoyette [MVP]

Cor Ligthert said:
Rudy,

When I look at the answers on your question, I only can give you one
aswer, in my opinion you are right, Microsoft has failed to make from .Net
a version independent platform even inside the windows environment.

With version 1.0 to version 1.1 it was going right, after that it looks
like the DLL hell again., 1.1 was backwards compatible to 1.0. In my
opinion it becomes time again that they have a look at these failures more
than creating all kind of gadgets.

Just my opinion.

Cor
Keep in mind that you are talking about running Beta software on RTM bits.
That said, it works for me, all you need to do is 1) make sure you target V2
and 2) don't use any new Framework features only available in V3.x.

Willy.
 
R

Rudy Meijer

Try to build your project without embedded manifest (project settings -
Application), or if you have the SDK installed run MT [1] to extract the
manifest from the exe and look what's on line 3.

mt.exe -managedassemblyname:your.exe -out:manifest.txt
when done inspect the manifest.txt

Willy.


I extracted the manifest from the HelloWorld.exe Console apllication
with the mt tool as you suggested:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity name="HelloWorld" version="1.0.0.0"
processorArchitecture="msil"></assemblyIdentity>
<file name="helloworld.exe" hashalg="SHA1"></file>
<dependency>
<dependentAssembly>
<assemblyIdentity name="mscorlib" version="2.0.0.0"
publicKeyToken="b77a5c561934e089"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

What is wrong with line 3 <assemblyIdentity>?

Rudy
 
B

Brian Gideon

Rudy,

When I look at the answers on your question, I only can give you one aswer,
in my opinion you are right, Microsoft has failed to make from .Net a
version independent platform even inside the windows environment.

With version 1.0 to version 1.1 it was going right, after that it looks like
the DLL hell again., 1.1 was backwards compatible to 1.0. In my opinion it
becomes time again that they have a look at these failures more than
creating all kind of gadgets.

Just my opinion.

Cor

Isn't DLL hell the scenario where two applications require bits from
the same DLL, but were tested against two unknowingly incompatible
versions of it which cannot coexist on the system? COM is a good
example because only one of the DLLs can be registered at any give
time making it very difficult for both applications to work
correctly. Using that definition of DLL hell I would say .NET solves
the problem. And like Willy said the complication here may be due to
a bug and not an architectural flaw.
 
W

Willy Denoyette [MVP]

Rudy Meijer said:
Try to build your project without embedded manifest (project settings -
Application), or if you have the SDK installed run MT [1] to extract the
manifest from the exe and look what's on line 3.

mt.exe -managedassemblyname:your.exe -out:manifest.txt
when done inspect the manifest.txt

Willy.


I extracted the manifest from the HelloWorld.exe Console apllication
with the mt tool as you suggested:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity name="HelloWorld" version="1.0.0.0"
processorArchitecture="msil"></assemblyIdentity>
<file name="helloworld.exe" hashalg="SHA1"></file>
<dependency>
<dependentAssembly>
<assemblyIdentity name="mscorlib" version="2.0.0.0"
publicKeyToken="b77a5c561934e089"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

What is wrong with line 3 <assemblyIdentity>?

There is nothing wrong with this manifest. I'm not sure why the error
message is referring to line 3, there are only two lines in this manifest,
line 1 ends with standalone="yes"?>, what follows is one single line. Did
you try without generating a manifest, or simply by compiling this with
csc.exe from the v2.0.50727 Framework folder? Anyway, VS2008 Beta2 compiled
code runs on a system having only the V2.0.50727 and V3.0 Frameworks
installed (no VS200X).

Willy.
 
R

Rudy Meijer

Try to build your project without embedded manifest (project settings -
Application), or if you have the SDK installed run MT [1] to extract the
manifest from the exe and look what's on line 3.
mt.exe -managedassemblyname:your.exe -out:manifest.txt
when done inspect the manifest.txt
Willy.
I extracted the manifest from the HelloWorld.exe Console apllication
with the mt tool as you suggested:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity name="HelloWorld" version="1.0.0.0"
processorArchitecture="msil"></assemblyIdentity>
<file name="helloworld.exe" hashalg="SHA1"></file>
<dependency>
<dependentAssembly>
<assemblyIdentity name="mscorlib" version="2.0.0.0"
publicKeyToken="b77a5c561934e089"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
What is wrong with line 3 <assemblyIdentity>?

There is nothing wrong with this manifest. I'm not sure why the error
message is referring to line 3, there are only two lines in this manifest,
line 1 ends with standalone="yes"?>, what follows is one single line. Did
you try without generating a manifest, or simply by compiling this with
csc.exe from the v2.0.50727 Framework folder? Anyway, VS2008 Beta2 compiled
code runs on a system having only the V2.0.50727 and V3.0 Frameworks
installed (no VS200X).

Willy.

Thanks Willy!!!

I build the HelloWorld application without manifest and it WORKS!!!
I Still don't understand why the default built, embedded manifest,
doesn't work.
Probably M$ needs some work to do before they official release VS2008.

Willy, thanks again for your willingness to help.

Rudy
 
W

Willy Denoyette [MVP]

Rudy Meijer said:
Try to build your project without embedded manifest (project
settings -
Application), or if you have the SDK installed run MT [1] to extract
the
manifest from the exe and look what's on line 3.
mt.exe -managedassemblyname:your.exe -out:manifest.txt
when done inspect the manifest.txt

I extracted the manifest from the HelloWorld.exe Console apllication
with the mt tool as you suggested:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity name="HelloWorld" version="1.0.0.0"
processorArchitecture="msil"></assemblyIdentity>
<file name="helloworld.exe" hashalg="SHA1"></file>
<dependency>
<dependentAssembly>
<assemblyIdentity name="mscorlib" version="2.0.0.0"
publicKeyToken="b77a5c561934e089"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
What is wrong with line 3 <assemblyIdentity>?

There is nothing wrong with this manifest. I'm not sure why the error
message is referring to line 3, there are only two lines in this
manifest,
line 1 ends with standalone="yes"?>, what follows is one single line. Did
you try without generating a manifest, or simply by compiling this with
csc.exe from the v2.0.50727 Framework folder? Anyway, VS2008 Beta2
compiled
code runs on a system having only the V2.0.50727 and V3.0 Frameworks
installed (no VS200X).

Willy.

Thanks Willy!!!

I build the HelloWorld application without manifest and it WORKS!!!
I Still don't understand why the default built, embedded manifest,
doesn't work.
Probably M$ needs some work to do before they official release VS2008.

Willy, thanks again for your willingness to help.

Rudy


Rudy,
VS2008 uses the V3.5 CSC complier even when you set the target to ".NET FW
2.0", however, when you also set to include a manifest, the resulting
assembly will need V2 SP1 of the CLR to run properly. AFAIK, V2 SP1 will be
released at the same time as VS2008, so, when currently targeting V2, you'll
have to turn of the manifest option or add a custom manifest to your
project.
Note that Adding (and editing) a custom manifest is the better option
especially when you need to run on Vista.

Willy.
 
J

J.B. Moreno

Brian Gideon said:
Isn't DLL hell the scenario where two applications require bits from
the same DLL, but were tested against two unknowingly incompatible
versions of it which cannot coexist on the system? COM is a good
example because only one of the DLLs can be registered at any give
time making it very difficult for both applications to work
correctly.

That's not all of DLL hell -- it's also swapping dll's around, not
knowing which is the latest and/or should be used with a particular
application or version of an application, and having dll's that should
have been statically linked but weren't.

Really, that's where it comes from -- dynamically linking is great when
you need it, but you really rarely need it.

..Net can prevent DLL hell, but it doesn't do so in a particularly good
manner....
 
B

Brian Gideon

That's not all of DLL hell -- it's also swapping dll's around, not
knowing which is the latest and/or should be used with a particular
application or version of an application, and having dll's that should
have been statically linked but weren't.

I won't go as far as to say it's all, but it is most of DLL hell. The
scenarios you mention can be attributed to mistakes in development,
testing, building, or version control and are all avoidable. The
scenario I mentioned is unavoidable and thus qualifies as DDL
hell...IMHO.
Really, that's where it comes from -- dynamically linking is great when
you need it, but you really rarely need it.

.Net can prevent DLL hell, but it doesn't do so in a particularly good
manner....

I think DLL hell and DLL managment are two different beasts. An
architecture can solve DLL hell and yet still have a difficult
management policy.

With that said I think .NET not only solves the problem, but has an
easy management policy as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top