Console App Compile issue

106 views
Skip to first unread message

TD

unread,
Feb 22, 2005, 2:23:57 PM2/22/05
to DotNetDe...@googlegroups.com
I have a working console app that I need to deploy to another machine.
I can build and run from Visual Studio but the c# command line complier
switches have me scratching my head.

Can anyone clear up just what I am supposed to indicate in the /out:,
/t: and /r: switches?

When I don't give the full path, it can't find the file, when I give it
the full path, it says it can't read.

A couple of error lists are below.

Thanks, TD


Compile Attempt
****************************

C:\windows_apps\ChartDraft>csc c:\windows_apps\ChartDraft\class1.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

Class1.cs(7,7): error CS0246: The type or namespace name 'iTextSharp'
could not
be found (are you missing a using directive or an assembly
reference?)
Class1.cs(8,7): error CS0246: The type or namespace name 'iTextSharp'
could not
be found (are you missing a using directive or an assembly
reference?)
Class1.cs(9,7): error CS0246: The type or namespace name 'ICSharpCode'
could not
be found (are you missing a using directive or an assembly
reference?)
Class1.cs(11,7): error CS0246: The type or namespace name 'Oracle'
could not be
found (are you missing a using directive or an assembly
reference?)
Class1.cs(12,7): error CS0246: The type or namespace name 'Oracle'
could not be
found (are you missing a using directive or an assembly
reference?)
Class1.cs(13,7): error CS0246: The type or namespace name 'Oracle'
could not be
found (are you missing a using directive or an assembly
reference?)
Class1.cs(28,10): error CS0246: The type or namespace name 'iTextSharp'
could
not be found (are you missing a using directive or an assembly
reference?)
Class1.cs(29,10): error CS0246: The type or namespace name 'iTextSharp'
could
not be found (are you missing a using directive or an assembly
reference?)
Class1.cs(30,10): error CS0246: The type or namespace name 'iTextSharp'
could
not be found (are you missing a using directive or an assembly
reference?)
Class1.cs(31,10): error CS0246: The type or namespace name 'iTextSharp'
could
not be found (are you missing a using directive or an assembly
reference?)
Class1.cs(87,44): error CS0246: The type or namespace name 'Phrase'
could not be
found (are you missing a using directive or an assembly
reference?)
Class1.cs(97,41): error CS0246: The type or namespace name 'Phrase'
could not be
found (are you missing a using directive or an assembly
reference?)
Class1.cs(107,10): error CS0246: The type or namespace name
'iTextSharp' could
not be found (are you missing a using directive or an assembly
reference?)
Class1.cs(122,9): error CS0246: The type or namespace name 'iTextSharp'
could
not be found (are you missing a using directive or an assembly
reference?)


Compile Attempt
***************************

C:\windows_apps\ChartDraft>csc c:\windows_apps\ChartDraft\class1.cs
/lib:C:\wind
ows_apps\ChartDraft\SharpZipLibReference_assy050\ICSharpCode.SharpZipLib.dll
C:\
windows_apps\ChartDraft\iTextSharpReference_ver.04\itextsharp.dll
C:\oracle\ora9
2\bin\Oracle.DataAccess.dll
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

error CS2015:

'c:\windows_apps\ChartDraft\iTextSharpReference_ver.04\itextsharp.dll'
is a binary file instead of a source code file
error CS1504: Source file

'c:\windows_apps\ChartDraft\iTextSharpReference_ver.04\itextsharp.dll'
could not be opened ('Unspecified error ')
error CS2015: 'c:\oracle\ora92\bin\Oracle.DataAccess.dll' is a binary
file
instead of a source code file
error CS1504: Source file 'c:\oracle\ora92\bin\Oracle.DataAccess.dll'
could not
be opened ('Unspecified error ')

Chauhan Yatin

unread,
Feb 23, 2005, 6:45:16 AM2/23/05
to DotNetDe...@googlegroups.com
why dont u use .net ide?
--
Chauhan Yatin
http://www.YQwe.com
GSM: +91-9824-228276

TD

unread,
Feb 23, 2005, 1:14:49 PM2/23/05
to DotNetDe...@googlegroups.com
I use "Build Solution" in the "Build" to create the app and after edits
to the code. Does this do what I want? I've tried moving the files
(.dll's and .exe) that are created in the application folder but they
do not work when not located on my machine.

What am I missing?

Thanks, TD

Richard Crist

unread,
Feb 23, 2005, 1:47:07 PM2/23/05
to DotNetDe...@googlegroups.com
I assume that the .net ide compiled your solution ok. To deploy it to
other folks' machines you will need to distribute the .NET Framework as
part of your package, or have them download and install it before
running your app. Check out the help information from within the .net
ide. The .net ide help information is largely based on MSDN Library,
so if you haven't installed MSDN Library then you may want to do that,
also. Hope this helps a little. :o)

TD

unread,
Feb 24, 2005, 10:27:40 AM2/24/05
to DotNetDe...@googlegroups.com
ide does compile and run. this sounds promising. I'll try and report.
thanks

TD

unread,
Feb 24, 2005, 3:17:39 PM2/24/05
to DotNetDe...@googlegroups.com
OK. it works now, though I still used the command line (didn't want to
give up). When looking up your suggestion, I ran across another msdn
article. I thought that multiple entries in the switches in the
command line arguments were seperated by white space, for /reference it
must be semi-colons.

Anyway, here is the working csc.

csc
/reference:C:\oracle\ora92\bin\Oracle.DataAccess.dll;C:\windows_apps\ChartDraft\iTextSharpReference_ver.04\itextsharp.dll;C:\windows_apps\ChartDraft\SharpZipLibReference_assy050\ICSharpCode.SharpZipLib.dll
/out:ChartDraft.exe *.cs

Thanks

Reply all
Reply to author
Forward
0 new messages