Wiki

Changes between Version 2 and Version 3 of CreateNewProjectInXamarinStudio

Show
Ignore:
Timestamp:
02/27/14 20:16:58 (10 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CreateNewProjectInXamarinStudio

    v2 v3  
    55Here are the steps. 
    66 
    7 = Create a new solution = 
     7= Create a New Solution with Library Project = 
    88 
    99 * Launch Xamarin Studio 4.2.3 
    1010 * File > New > Solution 
    11  * Choose "Cobra" > Console Project 
     11 * Choose Cobra > Console Project 
    1212 * Give a name like "!MyCompany.!MyProject.Lib" in the "Name:" field 
    1313 * Edit the "Solution name:" field to chop off the ".Lib" to make it "!MyCompany.!MyProject" 
     
    2626                return 2 
    2727}}} 
     28 
     29= Create Console Project = 
     30 
     31 * In the solution outline, the very top node says "!MyCompany.!MyProject" 
     32 * Right click it and choose Add > Add New Project 
     33 * Choose Cobra > Console Project 
     34 * Give a name like "!MyCompany.!MyProject.Console" in the "Name:" field. 
     35 * Right click in the new project in the solution outline and choose "Set As Startup Project" 
     36 * Open Program.cobra in the solution outline and add "Console.readLine": 
     37 
     38{{{ 
     39#!cobra 
     40""" 
     41Replace this text with a description of your program. 
     42""" 
     43 
     44class Program 
     45 
     46        def main 
     47                print 'Hello, world!' 
     48                Console.readLine  # <--- add this 
     49}}} 
     50 
     51= Copy the Core = 
     52 
     53I like to copy Cobra's core library to co-reside with my program. This insulates it from the environment. 
     54 
     55 * Right click "MyCompany.MyProject.Console" and choose "Options" 
     56 * Choose "Compiler" 
     57 * Make sure "Embed Run Time" is unchecked 
     58 * Add "-copy-core" to the "Cobra Arguments:" 
     59 * Click "OK" 
     60 
     61= Run It = 
     62 
     63 * Try running the project. 
     64   * If you get an error about System.Core, expand the References of the Console project in the solution outline, right click and choose "Delete".