[Mono-dev] .NET application compilation problem - could not found the ObjectQuery and ManagementObjectSearcher
Srinivas G.
srinivasg at esntechnologies.co.in
Tue Apr 4 06:38:06 EDT 2006
Dear All,
I am newbie to this mono frame work.
I download the source files from the following link and installed them
on a Fedora Core 3 box.
http://go-mono.com/sources/mono-1.1/mono-1.1.13.4.tar.gz
I was able to compile and run the simple hello world program which look
likes as
using System;
using System.IO;
using System.Text;
namespace HelloNameSpace
{
public class Hello
{
static void Main(string[] args)
{
Console.WriteLine("What we think, we become.");
}
}
}
I was compiled the above program using the following command
# mcs hello.cs
I ran the program using the following command.
# mono hello.exe
It is ok. But when I try to compile a .NET application (written like
hello.cs) I got the following compilation errors.
I compiled the .NET application using # mcs -pkg: dotnet <SourceFile>
I included the System.Managemet
SampleObjectQuery.cs(8,9): error CS0246: The type or namespace name
`ObjectQuery' could not be found. Are you missing a using directive or
an assembly reference?
SampleObjectQuery.cs(25,9): error CS0246: The type or namespace name
`ManagementObjectSearcher' could not be found. Are you missing a using
directive or an assembly reference?
In my .NET application I used the ObjectQuery and
ManagementObjectSearcher methods to create objects.
I have gone through the class directory where we can find the methods.
But I could not find the above mentioned class methods. But I found the
ObjectGetOptions method.
What could be the problem? Could any one give a hint?
Thanks in advance.
Regards,
Srinivas G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060404/bad7b056/attachment.html
More information about the Mono-devel-list
mailing list