473,387 Members | 1,791 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.

Difficulty creating netmodule from .dll with csc

I am trying this project out:

http://www.codeproject.com/useritems/javacsharp.asp

I am having difficulty building parts of it with Visual Studio .NET
2003 because of a post-build step that attempts to create a netmodule
from a .dll using the following command:

csc /debug /t:module "$(OutDir)\$(ProjectName).dll"

The resulting error I get is:

'Debug\HelloWorld.dll' is a binary file instead of a source code file
'Debug\HelloWorld.dll' could not be opened ('Unspecified error ')

I'm not very experienced with .NET or for that matter Visual Studio, so
this could be reallly simple.

Jun 22 '06 #1
3 6410
wheresjim,

You need to specify the output. You do that with the /out switch, like
so:

csc /debug /t:module /out:"(OutDir)\$(ProjectName).dll"

Anything that doesn't have a flag is considered input to the compiler.
Since you specified nothing, it considered the dll input.

Also, you shouldn't really use dll to specify the output. If you are
compiling to a module, you can't specify a reference or anything like that
to it. You should use the .netmodule extension.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"wheresjim" <wh*******@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
I am trying this project out:

http://www.codeproject.com/useritems/javacsharp.asp

I am having difficulty building parts of it with Visual Studio .NET
2003 because of a post-build step that attempts to create a netmodule
from a .dll using the following command:

csc /debug /t:module "$(OutDir)\$(ProjectName).dll"

The resulting error I get is:

'Debug\HelloWorld.dll' is a binary file instead of a source code file
'Debug\HelloWorld.dll' could not be opened ('Unspecified error ')

I'm not very experienced with .NET or for that matter Visual Studio, so
this could be reallly simple.

Jun 22 '06 #2
The desired output is actually a netmodule, and the input is the .dll,
the dll is not the desired output. So perhaps I sould be asking how to
convert a .dll to a .netmodule.


Nicholas Paldino [.NET/C# MVP] wrote:
wheresjim,

You need to specify the output. You do that with the /out switch, like
so:

csc /debug /t:module /out:"(OutDir)\$(ProjectName).dll"

Anything that doesn't have a flag is considered input to the compiler.
Since you specified nothing, it considered the dll input.

Also, you shouldn't really use dll to specify the output. If you are
compiling to a module, you can't specify a reference or anything like that
to it. You should use the .netmodule extension.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"wheresjim" <wh*******@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
I am trying this project out:

http://www.codeproject.com/useritems/javacsharp.asp

I am having difficulty building parts of it with Visual Studio .NET
2003 because of a post-build step that attempts to create a netmodule
from a .dll using the following command:

csc /debug /t:module "$(OutDir)\$(ProjectName).dll"

The resulting error I get is:

'Debug\HelloWorld.dll' is a binary file instead of a source code file
'Debug\HelloWorld.dll' could not be opened ('Unspecified error ')

I'm not very experienced with .NET or for that matter Visual Studio, so
this could be reallly simple.


Jun 22 '06 #3
Ahh, see, that's completely different. CSC.exe is used to compile
source into il, not to pull apart assemblies.

I don't think you can extract a netmodule from a dll or exe. However,
what you can do is use ILDASM to generate the IL files for the assembly, and
then compile them selectively.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"wheresjim" <wh*******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
The desired output is actually a netmodule, and the input is the .dll,
the dll is not the desired output. So perhaps I sould be asking how to
convert a .dll to a .netmodule.


Nicholas Paldino [.NET/C# MVP] wrote:
wheresjim,

You need to specify the output. You do that with the /out switch,
like
so:

csc /debug /t:module /out:"(OutDir)\$(ProjectName).dll"

Anything that doesn't have a flag is considered input to the
compiler.
Since you specified nothing, it considered the dll input.

Also, you shouldn't really use dll to specify the output. If you are
compiling to a module, you can't specify a reference or anything like
that
to it. You should use the .netmodule extension.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"wheresjim" <wh*******@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
>I am trying this project out:
>
> http://www.codeproject.com/useritems/javacsharp.asp
>
> I am having difficulty building parts of it with Visual Studio .NET
> 2003 because of a post-build step that attempts to create a netmodule
> from a .dll using the following command:
>
> csc /debug /t:module "$(OutDir)\$(ProjectName).dll"
>
> The resulting error I get is:
>
> 'Debug\HelloWorld.dll' is a binary file instead of a source code file
> 'Debug\HelloWorld.dll' could not be opened ('Unspecified error ')
>
> I'm not very experienced with .NET or for that matter Visual Studio, so
> this could be reallly simple.
>

Jun 22 '06 #4

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

Similar topics

4
by: MLH | last post by:
I am having failures processing the following command and I wonder if you can tell me what I must do in order to have success. When I try to run source mysql_dump.sql.txt ==> it is a problem...
1
by: Keith Work | last post by:
I'm stuck on a thorny problem here. Maybe someone can help (sorry for the long explanation): Oulook 2k. I have 2 tables (tblConversion and tblTemplate) in a database that I'm using to convert...
1
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access...
5
by: Steven Blair | last post by:
Hi, I have a VB.NET class which I would like to use in a C# application. I know I can create a C# class inherited from the VB.NET, but have only done this using seperate DLL's (One DLL for VB,...
3
by: TJS | last post by:
in this command line to create a strong name, what is the ".netmodule", and how do I create/get one ? al /out:MyAssembly.dll MyModule.netmodule /keyfile:sgKey.snk
3
by: wheresjim | last post by:
I am trying this project out: http://www.codeproject.com/useritems/javacsharp.asp I am having difficulty building parts of it with Visual Studio .NET 2003 because of a post-build step that...
1
by: Bern McCarty | last post by:
I know how with VC8 you embed your linker generated manifest into an exe with a resource ID of #1 and into a dll with resource ID #2. But what do you do with the linker generated manifest for a...
5
by: Rico | last post by:
Hello, I'm trying to create a simple back up in the SQL Maintenance Plan that will make a single back up copy of all database every night at 10 pm. I'd like the previous nights file to be...
1
by: =?Utf-8?B?d3BjbWFtZQ==?= | last post by:
Probably doing something stupid but can't find what. I have a C++/CLI module. In the final assembly I include 2 C# .netmodules. Everything has worked fine until recently when the output assembly...
0
by: Douglas Zuniga | last post by:
First at al Hi. I'm having some problems trying to connect my C# program-classes to Java, I've been reading about it and I found this:...
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: 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
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.