473,387 Members | 1,771 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,387 software developers and data experts.

.NET v1.1 csc.exe compiler bug?

I first thought I had some compiler setting wrong in VC# 2003 but it turns
out that it has something to do with .NET framework v1.1 itself.
If I understand correctly, .NET installer also installs a csc.exe C#
compiler. And VC# 2003 is using this csc.exe compiler.

Uninstalled an reinstalled both the .NET v1.0 and v1.1 framework multiple
times now.
I also repaired, uninstalled and installed VC# 2002 and 2003 and the full
trial version, no sollution.

What happened? Wel this:

I took a stupidly simple console program (with no unsafe code or any
modifications).
And I compile using the command line compiler like this:

----
D:\Source\Scratch\Managed\Testing\ConsoleApplicati on1>csc.exe /out:clas
:exe /r:MSCorLib.dll class1.cs
----

This is the result that I get, and the exe is there and works fine:

----
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
----

Now I add one simple additional command "/unsafe+"

----
D:\Source\Scratch\Managed\Testing\ConsoleApplicati on1>csc.exe /out:clas
:exe /r:MSCorLib.dll /unsafe+ class1.cs

Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

error CS1577: Assembly generation failed -- Unexpected exception
proces
attribute -- System.ArgumentException: Invalid directory on URL
----

So it seems that this *System.ArgumentException* is an error from the
csc.exe compiler??? No exec code exists.

One odd thing is that when I use "/unsafe-" (minus) then it compiles
without problems.

This works fine using the VC# 2002!!!!! And it also works fine using VC#
2003 at a different computer installed from the same installation disk.

One final test I did was using the C# csc.exe from framework 1.0 and this
one DID compile with "/unsafe+" !!!!!
See below:

D:\Source\Scratch\Managed\Testing\ConsoleApplicati on1>C:\WINNT\Microsoft.NET
\Fra
mework\v1.0.3705\csc /out:test.exe /unsafe+ class1.cs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.

Mysteries, mysteries,....
Do we have here some .NET 1.1 csc.exe bug???
Jul 21 '05 #1
2 8235
No problem here running V1.1

Note that csc.exe is the command line front-end the "real" compiler is cscomp.dll. VS uses the cscomp.dll directly.

Willy.
<Ol**********@skyscan.be> wrote in message news:3f***********************@reader0.news.skynet .be...
I first thought I had some compiler setting wrong in VC# 2003 but it turns
out that it has something to do with .NET framework v1.1 itself.
If I understand correctly, .NET installer also installs a csc.exe C#
compiler. And VC# 2003 is using this csc.exe compiler.

Uninstalled an reinstalled both the .NET v1.0 and v1.1 framework multiple
times now.
I also repaired, uninstalled and installed VC# 2002 and 2003 and the full
trial version, no sollution.

What happened? Wel this:

I took a stupidly simple console program (with no unsafe code or any
modifications).
And I compile using the command line compiler like this:

----
D:\Source\Scratch\Managed\Testing\ConsoleApplicati on1>csc.exe /out:clas
:exe /r:MSCorLib.dll class1.cs
----

This is the result that I get, and the exe is there and works fine:

----
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
----

Now I add one simple additional command "/unsafe+"

----
D:\Source\Scratch\Managed\Testing\ConsoleApplicati on1>csc.exe /out:clas
:exe /r:MSCorLib.dll /unsafe+ class1.cs

Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

error CS1577: Assembly generation failed -- Unexpected exception
proces
attribute -- System.ArgumentException: Invalid directory on URL
----

So it seems that this *System.ArgumentException* is an error from the
csc.exe compiler??? No exec code exists.

One odd thing is that when I use "/unsafe-" (minus) then it compiles
without problems.

This works fine using the VC# 2002!!!!! And it also works fine using VC#
2003 at a different computer installed from the same installation disk.

One final test I did was using the C# csc.exe from framework 1.0 and this
one DID compile with "/unsafe+" !!!!!
See below:

D:\Source\Scratch\Managed\Testing\ConsoleApplicati on1>C:\WINNT\Microsoft.NET
\Fra
mework\v1.0.3705\csc /out:test.exe /unsafe+ class1.cs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.

Mysteries, mysteries,....
Do we have here some .NET 1.1 csc.exe bug???

Jul 21 '05 #2
> No problem here running V1.1

Note that csc.exe is the command line front-end the "real" compiler is cscomp.dll. VS uses the cscomp.dll directly.

Yesterday I tried to compile this on my home computer and it worked fine.

Only the computer here at my work gives problems and it must be some .NET
configuration setting that is wrong.
One time I had a big problem with an alink error, and that turned out to be
environment variable space that was too small and one of the paths got
trunctated.
This time I checked this environment space and all paths are there and
correct. Maybe some other configuration file?

I give up, and revert back to VC# 2002 because that one worked without
problems except for deployment problems when I use multiple dll's.

In my opinion, I love the .NET and C# but it is not ready yet to replace the
conventionaly exe files yet in a commercial way.
I just use this for small projects that are to be created fast and only used
internally.

You did give me an interesting ide about this cscomp.dll, I will have to
check this.
Thanks. :-)


Jul 21 '05 #3

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

Similar topics

2
by: Jeff Epler | last post by:
Hello. Recently, Generator Comprehensions were mentioned again on python-list. I have written an implementation for the compiler module. To try it out, however, you must be able to rebuild...
13
by: Bryan Parkoff | last post by:
You may notice that switch (...) is much faster than function that can gain a big improved performance because it only use JMP instruction however function is required to use CALL, PUSH, and POP...
10
by: Bjorn | last post by:
I'm using interfaces in C++ by declaring classes with only pure virtual methods. If then someone wants to implement the interface they needs to inherit from the class. If the implementing class...
7
by: Tao Wang | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I saw cuj's conformance roundup, but the result is quite old. I think many people like me want to know newer c++ standard conformance test...
14
by: joshc | last post by:
I'm writing some C to be used in an embedded environment and the code needs to be optimized. I have a question about optimizing compilers in general. I'm using GCC for the workstation and Diab...
16
by: pj | last post by:
(Was originally, probably wrongly, posted to the vc subgroup.) (This doesn't appear to be a c# problem, but a problem with a bug in the Visual Studio c# compiler, but, any help will be welcome...)...
0
by: rollasoc | last post by:
Hi, I seem to be getting a compiler error Internal Compiler Error (0xc0000005 at address 535DB439): likely culprit is 'BIND'. An internal error has occurred in the compiler. To work around...
3
by: Mark Rockman | last post by:
------ Build started: Project: USDAver2, Configuration: Debug .NET ------ Preparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error...
6
by: toton | last post by:
Hi, Anyone have a link to comparative study of different C++ compilers and how much they conform to C++ language standard? Most of the big platforms I know have GCC which well supports C++...
41
by: Miroslaw Makowiecki | last post by:
Where can I download Comeau compiler as a trial version? Thanks in advice.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.