Estoy intentando compilar una secuencia de comandos de C# con Mono en Debian por línea de comandos, así:cómo hacer referencia a estos paquetes con Mono con el fin de recopilar
gmcs Main.cs
Sin embargo, me sale el siguiente error:
Main.cs(6,14): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing an assembly reference?
Main.cs(7,14): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing an assembly reference?
Main.cs(12,7): error CS0246: The type or namespace name `iTextSharp' could not be found. Are you missing a using directive or an assembly reference?
Main.cs(13,7): error CS0246: The type or namespace name `iTextSharp' could not be found. Are you missing a using directive or an assembly reference?
Main.cs(1526,31): error CS0246: The type or namespace name `Bitmap' could not be found. Are you missing a using directive or an assembly reference?
Main.cs(6,14): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing an assembly reference?
Main.cs(7,14): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing an assembly reference?
Main.cs(12,7): error CS0246: The type or namespace name `iTextSharp' could not be found. Are you missing a using directive or an assembly reference?
Main.cs(13,7): error CS0246: The type or namespace name `iTextSharp' could not be found. Are you missing a using directive or an assembly reference?
Compilation failed: 9 error(s), 1 warnings
Estas las referencias en la parte superior de Main.cs
:
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using iTextSharp.text;
using iTextSharp.text.pdf;
yo entiendo que tengo que contar Mono qué bibliotecas incluir agregando -pkg:whatever
. Mi problema es que no sé cómo se llaman estas bibliotecas, así que no sé qué comando usar para incluirlas. En realidad, ni siquiera sé si tengo que descargar estas bibliotecas desde algún lugar o si vienen con Mono.
Tenga en cuenta también que los últimos 2 son la biblioteca iTextSharp, para la cual tengo itextsharp.dll
que acaba de colocar en el mismo directorio que el script, ya que no sé qué más hacer con él.
¡Por favor alguien podría explicarme cómo hacer para compilar el archivo!
Funcionó. ¡Gracias! Aceptaré tu respuesta cuando el sitio me lo permita. – Alasdair
Con las nuevas versiones mono, solo hay un compilador ahora y eso es mcs. – Salil
En OSX sería 'mcs -reference: System.Drawing.dll Main.cs', etc. Y esto encontrará los archivos en el mismo directorio. Probablemente sea obvio, pero nunca se sabe. – atomicules