Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have the scenario as there are four projects named as
1) Freedom.Composite.Core
2) Freedom.Composite.Styles(Catalogs,Commands,Converters,LoggerComponents,LoggersViewModelHelper)
3) Freedom.Core.XmlSerializers(Different Styles of the UI)
4) SyncDash(There are views into it.The )

When I execute these project it prompts me "A project with output type of class library could not be started directly.
In orderto debug these project,add an executable project to this solution which references the library project.Set the executable project as the startup project."

So for this I have made a hello world project referring the link http://msdn.microsoft.com/en-us/library/ff921141(v=pandp.40).aspx

So got it from the sample Application that it is the 'Bootstrapper that loads the projects'.
The source code for the Bootstrapper is as Given below.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.Unity;



namespace HelloWorld.Desktop
{
class Bootstrapper : UnityBootstrapper
{

protected override DependencyObject CreateShell()
{

return new Shell();
}

protected override void InitializeShell()
{
base.InitializeShell();

Application.Current.MainWindow = (Window)this.Shell;
Application.Current.MainWindow.Show();

}


protected override void ConfigureModuleCatalog()
{
base.ConfigureModuleCatalog();
ModuleCatalog moduleCatalog = (ModuleCatalog)this.ModuleCatalog;
// moduleCatalog.AddModule(typeof(HelloWorldModule2.HelloWorldModule2));
//moduleCatalog.AddModule(typeof(SyncDash.Views.SyncDashMainView));
moduleCatalog.AddModule(typeof(SyncDash.Views.UCSyncSettings));
//moduleCatalog.AddModule(typeof(SyncDash.Views.UCServiceBusSettings));

}




}

}



So when I run the Solution It gives me an Activation Exception....I really need to run this solution on a high priority...Please help me .....Its on a high priority .Thanks in advance .
Posted
Comments
Sergey Alexandrovich Kryukov 28-Oct-14 23:59pm    
How about just paying more attention to what you are doing? How about learning your tools (such as VS) before using them?
—SA
Member 11143298 29-Oct-14 0:10am    
Thanks for your concern but i have done the same thing setup the executable project as the startup project btu it throws an activation exception.....Please let me out of this...thanks in advance
Sergey Alexandrovich Kryukov 29-Oct-14 0:12am    
Did you see my answer? :-)
And please tell us what do you really want, to be "out of this", or be in, that is, to be a software developer. Maybe we don't have to bother...
—SA
Member 11143298 29-Oct-14 0:32am    
alright sorry to bother you....please you can help me.
Sergey Alexandrovich Kryukov 29-Oct-14 1:55am    
Nothing to be sorry about, except not trying to communicate.
Did you see my answer?
—SA

It has nothing to do with your code. This is nothing but the matter of using Visual Studio. It's Solution Explorer has the context menu. You need to choose what to run. Select the application project node, not the library project. Activate the context menu. Either run selected application from that menu, or makes it "startup project" to be started when you "run" the solution (F5).

—SA
 
Share this answer
 
v2
I did that made an executable project as startup project but yet it gives an activation exception. what should I do?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900