Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Roger Withnell 128 posts 613 karma points
    Sep 07, 2015 @ 14:42
    Roger Withnell
    0

    Project with an Output Type of Class Library cannot be started directly

    I built my Umbraco project using Visual Studio 2013 and MVC on my development platform and uploaded all the files to the production platform (Windows 2008 R2 and IIS7) and then created "Project from existing code" in VS. Both platform refer to the same MSSQL database.

    No problems debugging on the development platform. When I debug on the production platform I get the message "a Project with an Output Type of Class Library cannot be started directly".

    I understand from my research that, because the Umbraco project is of Output Type Class Library, there is only a DLL and no executable.

    The advice is to add an executable project to the solution, reference the Umbraco project from it, set the executable project to start and invoke the Umbraco project from it to debug the latter.

    Accordingly, I have added a Web Forms Application project, added a button click event to it and now want to invoke the Umbraco project.

    Here is my web form. The Umbraco project is called UbeUmbraco:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using UbeUmbraco; //Umbraco project namespace
    
    namespace WindowsFormsApplication3
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                //How invoke the UbeUmbraco project here?         
            }
        }
    }
    

    Your help would be much appreciated.

    Thanking you in anticipation.

    Roger

Please Sign in or register to post replies

Write your reply to:

Draft