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

Something else: Unsafe code gives a error CS1577: Assembly generation failed

Wel, I am rebuilding the VC# 2002 project that I have deployment problems
with the 2003 version, hoping this solves the problems, but now I encounter
this wierd bug???

If I have the project, and do not compile with "Allow Unsafe Code
Blocks=false" set to true, then the project compiles and no problems.
BUT if I compile with "Allow Unsafe Code Blocks=true" then I het the error
below. With unsafe {} of unsave{} removed it dos not solve the problem.
Maybe this is also related to thge installation problem I had?????

(In VC# 2002 this compiled without problems. )

------ Build started: Project: CtRepair, Configuration: Debug .NET ------
Preparing resources...
Updating references...
Performing main compilation...
error CS1577: Assembly generation failed -- Unexpected exception processing
attribute -- System.ArgumentException: Invalid directory on URL..
Build complete -- 1 errors, 0 warnings
Building satellite assemblies...
Satellite assemblies could not be built because the main project output is
missing.

---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped

Nov 15 '05 #1
8 5396
<Ol**********@skyscan.be> wrote:
Wel, I am rebuilding the VC# 2002 project that I have deployment problems
with the 2003 version, hoping this solves the problems, but now I encounter
this wierd bug???

If I have the project, and do not compile with "Allow Unsafe Code
Blocks=false" set to true, then the project compiles and no problems.
BUT if I compile with "Allow Unsafe Code Blocks=true" then I het the error
below. With unsafe {} of unsave{} removed it dos not solve the problem.
Maybe this is also related to thge installation problem I had?????


Well, when it shows that error, does it show which attribute it's
processing?

Does it happen if you just start a new effectively blank project and
turn unsafe code on?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
> > Wel, I am rebuilding the VC# 2002 project that I have deployment
problems
with the 2003 version, hoping this solves the problems, but now I encounter this wierd bug???

If I have the project, and do not compile with "Allow Unsafe Code
Blocks=false" set to true, then the project compiles and no problems.
BUT if I compile with "Allow Unsafe Code Blocks=true" then I het the error below. With unsafe {} of unsave{} removed it dos not solve the problem.
Maybe this is also related to thge installation problem I had?????
Well, when it shows that error, does it show which attribute it's
processing?

No, only this line in the output: "error CS1577: Assembly generation
failed -- Unexpected exception processing
attribute -- System.ArgumentException: Invalid directory on URL"..

And this line as task: "Assembly generation failed -- Unexpected exception
processing attribute -- System.ArgumentException: Invalid directory on
URL.".
Does it happen if you just start a new effectively blank project and
turn unsafe code on?

Yes,I just tested.

This is VC# 2003 standard.
But on this machine VC# standard and VC++ 2002 standard are also installed
so is VC 6 professional.
Also .NET 1.0, .NET 1.1 (all English version) and any critical update from
Windows...
(All official versions!)

Maybe this is related to the installation trouble I have. ???


Nov 15 '05 #3
<Ol**********@skyscan.be> wrote:
Does it happen if you just start a new effectively blank project and
turn unsafe code on?
Yes,I just tested.


That sounds like your installation of VC# is a bit broken.

It certainly works fine if I just turn unsafe code blocks on for a
random project in my VS.NET 2003 installation.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4
> > > Does it happen if you just start a new effectively blank project and
turn unsafe code on?

Yes,I just tested.


That sounds like your installation of VC# is a bit broken.

It certainly works fine if I just turn unsafe code blocks on for a
random project in my VS.NET 2003 installation.

I just installed it today. But I am going to try the repair function, maybe
it solves the problem.
I did uninstall the VC# 2002 to be sure that I do not have conflict between
installations.

But thanks for the replies. :-)
Olaf

Nov 15 '05 #5
> > > If I have the project, and do not compile with "Allow Unsafe Code
Blocks=false" set to true, then the project compiles and no problems.
BUT if I compile with "Allow Unsafe Code Blocks=true" then I het the error below. With unsafe {} of unsave{} removed it dos not solve the problem. Maybe this is also related to thge installation problem I had?????


Well, when it shows that error, does it show which attribute it's
processing?

No, only this line in the output: "error CS1577: Assembly generation
failed -- Unexpected exception processing
attribute -- System.ArgumentException: Invalid directory on URL"..

And this line as task: "Assembly generation failed -- Unexpected exception
processing attribute -- System.ArgumentException: Invalid directory on
URL.".

I just reinstalled everyting (VC# 2003 standard), but the problem persits
I create a new project, compile=ok, then turn on to allow unsafe code and
the dreaded "error CS1577: Assembly generation failed -- Unexpected
exception processing....."

The 2003 did not have problems with this.
Any tips would be welcome. :-)

Olaf

Nov 15 '05 #6
> > > Does it happen if you just start a new effectively blank project and
turn unsafe code on?

Yes,I just tested.


That sounds like your installation of VC# is a bit broken.

It certainly works fine if I just turn unsafe code blocks on for a
random project in my VS.NET 2003 installation.


I repaired everything. The unsafe option still gives this dreaded error:

No, only this line in the output: "error CS1577: Assembly generation
failed -- Unexpected exception processing
attribute -- System.ArgumentException: Invalid directory on URL"..

And this line as task: "Assembly generation failed -- Unexpected exception
processing attribute -- System.ArgumentException: Invalid directory on
URL.".

It doens't matter if I create a completely new class project or empty form
project.

Then I uninstalled the VC# 2003 and VC# 2002 completely, rebooted and
reinstalled VC# 2003.
Guess what? This error is back once I try to compile allowing unsafe code.
:-(

And I must use unsafe code since I need pointer typecasting to read in our
file formats. .

VC# 2002 did compile without trouble!

Anybody out there that have any idea why this happens?
Or what it means?

I have no idea what directory or URL it is refering to...
Nov 15 '05 #7
> > No, only this line in the output: "error CS1577: Assembly generation
failed -- Unexpected exception processing
attribute -- System.ArgumentException: Invalid directory on URL"..

And this line as task: "Assembly generation failed -- Unexpected exception processing attribute -- System.ArgumentException: Invalid directory on
URL.".

I just reinstalled everyting (VC# 2003 standard), but the problem persits
I create a new project, compile=ok, then turn on to allow unsafe code and
the dreaded "error CS1577: Assembly generation failed -- Unexpected
exception processing....."

The 2003 did not have problems with this.
Any tips would be welcome. :-)

I finally managed to discover that the error occurs in the CSharp csc.exe
compiler itself, and seems to be not part of my the program.
I took a supidly simple console program.

And I compile using the command line compiler like this:

***D:\Source\Scratch\Managed\Testing\ConsoleApplic ation1>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\ConsoleApplic ation1>csc.exe /out:clas
:exe /r:MSCorLib.dll /unsafe+ class1.cs***

And here is the result I get from the compiler

***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???

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.

Mysteries, mysteries,....
Anyone idea's what else to check?

Nov 15 '05 #8
> Now I add one simple additional command "/unsafe+"

***D:\Source\Scratch\Managed\Testing\ConsoleApplic ation1>csc.exe /out:clas
:exe /r:MSCorLib.dll /unsafe+ class1.cs***

And here is the result I get from the compiler

***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
***


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.

Nov 15 '05 #9

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

Similar topics

2
by: Mike Fisher | last post by:
I'm seeing an error when I try to run/debug a web service. Although it doesn't happen every time, it does occur more than half of the times I hit F5. It appears to be returned by the the JIT...
2
by: Vishal - Auh | last post by:
Hi, I'm creating a Strong named assembly which has a reference to a third-party Assembly. When I try to compile my assembly, I receive the following error "Assembly generation Failed --...
4
by: CodeTyro | last post by:
My native language being C++, I've got a few questions that a couple of hours of searching on msdn didn't answer. First, when using unsafe code and pointers, what is the C# equivalent to the C++...
3
by: Hamilton | last post by:
Hi there, I've seen this error appear a few times in newsgroups but unfortunately I haven't found one that actually provides a solution. I'm basically deploying a new website into an area at a...
1
by: Razzie | last post by:
Hi all, I was working on a little project, worked fine, but now all of a sudden I get: The compiler failed with error code -1073741502 as an error message (when running the site, not...
1
by: Alan T | last post by:
I have a project references a DLL(by Add Reference), so far so good. However, if I change my application from exe to a class library and also added a reference to that same DLL, I got a compilation...
1
by: bhanupoornakumar | last post by:
Hi .. when i am setting a website i am getting the following error.. The compiler failed with error code -1073741819. This is the full error .. u can see below. Compilation Error ...
1
by: rkcons | last post by:
Any ideals what would cause this ? Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific...
1
by: kmsandeep17 | last post by:
when i host my site on go daddy it give error Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.