Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8072171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:55:56+00:00 2026-06-05T13:55:56+00:00

I downloaded a few source codes containing C# code that uses windows forms. Is

  • 0

I downloaded a few source codes containing C# code that uses windows forms. Is it possible to compile the codes under the Linux environment (Ubuntu 12.04) and run it?

I already tried successfully to compile a few C# source codes with mcs and run the resulting exe file with mono.

The source codes can be downloaded here. If it’s possible please describe how would you compile and run chapter 2/OpeningDocument solution.

$ mcs Program.cs 
Program.cs(3,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Compilation failed: 1 error(s), 0 warnings

EDIT

$ gmcs -pkg:dotnet Program.cs 
Program.cs(17,33): error CS0246: The type or namespace name `Form1' could not be found. Are you missing a using directive or an assembly reference?
Program.cs(17,25): error CS1502: The best overloaded method match for `System.Windows.Forms.Application.Run(System.Windows.Forms.Form)' has some invalid arguments
/usr/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll (Location of the symbol related to previous error)
Program.cs(17,25): error CS1503: Argument `#1' cannot convert `object' expression to type `System.Windows.Forms.Form'
Compilation failed: 3 error(s), 0 warnings
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:55:59+00:00Added an answer on June 5, 2026 at 1:55 pm

    If you’re not using the latest version of Mono, this should work:

    gmcs -pkg:dotnet *.cs
    

    The latest version of mono uses mcs instead of gmcs. In the previous ones, mcs targets .NET 1.1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is something I've really never seen but, I downloaded the source code of
I have a few questions regarding android source code download, repo / git. This
So here is the story. I have this device that uses Linux and more
I downloaded JDK source code (6u23 build b5) for research, and Eclipsed decided to
I have read in a few places that you can compile Ninject to work
Downloaded a few open source php scripts such as Wordpress and Moodle to study
I downloaded the android Email app source code [version 2.2].I deleted the .classpath and
Within my Subversion project I have a few directories that contain other open source
I'm trying to compile an open source project I downloaded which was apparently written
Possible Duplicate: Where is the c++11 standard I am looking to buy/download a few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.