Problem compiling WinForms using Mono

Sorry if the question is to “simple”

I am trying to compile Winforms using command;

$mcs filename.cs -pkg:dotnet

The error message is;

Package dotnet was not found in the pkg-config search path.
Perhaps you should add the directory containing `dotnet.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘dotnet’ found
error CS8027: Error running pkg-config. Check the above output.

How to add dotnet into pkg-config?

Hi
the pkg-config files are normally in the corresponding devel file(s).
That to me would indicate you haven’t installed mono-devel package.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.37-0.1-default
up 1:25, 2 users, load average: 0.12, 0.05, 0.01
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Hi malcolmlewis,
Thank you for your prompt response.

I had install;

  1. mono-devel (glib2-devel+glibc-devel+linux-kernel-headers)
  2. mono-extras

and the previous problem solved. After the installation, I recompile the program using;

$mcs hello.cs -pkg:dotnet

and this are the new problem.

error CS0006: cannot find metadata file Microsoft.JScript.dll' error CS0006: cannot find metadata file System.Data.OracleClient.dll’
Compilation failed: 2 error(s), 0 warnings

The question is?
How to I import this windows system file onto openSUSE, so that the compilation will be successful.

This tutorial I get from Mono Basics - Mono

Thank you.

When you ran MoMa on your application did it pass the application or give warnings?

There are no warning given but error in compiling the program which are;

error CS0006: cannot find metadata file Microsoft.JScript.dll' error CS0006: cannot find metadata file System.Data.OracleClient.dll’
Compilation failed: 2 error(s), 0 warnings

Hi
Install mono-jscript and mono-data-oracle.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.37-0.1-default
up 16:27, 2 users, load average: 0.23, 0.20, 0.15
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Thank you malcolmlewis,
The problem solve.

Hi
Glad you have it all sorted :slight_smile:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.37-0.1-default
up 20:54, 2 users, load average: 0.04, 0.10, 0.12
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18