MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Build errors when setting up my first custom MonoX project  (Mono Support )

Viewed 11753 time(s), 3 post(s) 11/25/2013 2:39:55 AMby CaspianCanuck
CaspianCanuck

CaspianCanuck

11/25/2013 2:39:55 AM
Following the instructions on setting up a custom project I downloaded and unzipped MonoX from the download link and was able to run it in my IIS.  But when I opened the code in VS I noticed that references to .CS code-behind files in ASPX code is underlined green, meaning the files don't exist. But I was able to find them in your Demo Pages code downloaded from GitHub, so I decided to copy them into the solution and do Include In Project one by one.  However, now when I attempt to build the solution I get a bunch of compile time errors complaining that namespaces  MonoSoftware.MonoX.Resources, MonoSoftware.MonoX.DAL and several others cannot be found.  All these errors come from the .CS files I added into the solution.

I am lost. What am I doing wrong?

P.S. Any plans to make this support forum searchable?

This content has not been rated yet. 
15 Reputation 1 Total posts
idrazic

idrazic

11/25/2013 12:21:39 PM
Hi,

You don't need to add the .cs files from the demo-pages code. Codebehind files are not physically present, that's true, because they are compiled into MonoX dll. Your custom project will be fully functional without them, the only hinderance will be the underlined lines. 

If you want to change the functionality of one of the pages, you will need to add your own codebehind file that inherits the MonoX page.
For example your custom login page code could look like this:

using System;
 
namespace MyCustomProject.Web
{
    public partial class Login : MonoSoftware.MonoX.Pages.Login
    {
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
 
            ctlLoginSocial.Visible = false;
        }
    }
}


Then modify the "Inherits" line in the markup to your namespace -> Inherits="MyCustomProject.Web.Login"
Finally right click the markup and choose "Convert to Web Application" for designer file to be created.

The demo-pages and some other parts are open-sourced so that people can have an insight in what the compiled code does.

Hope that helps,

Igor
This content has not been rated yet. 
1384 Reputation 152 Total posts
idrazic

idrazic

11/25/2013 12:44:33 PM
>> P.S. Any plans to make this support forum searchable?

Click on the search text box in the upper right corner of the page (see the attached image).
If you have any problems with the search please open up a separate topic. 
This content has not been rated yet. 
1384 Reputation 152 Total posts