3
respostas

A Project with an output Type of class library cannot be started directly.

Eu utilizo o windows, ou seja, estou tentando usar o xamarin pelo visual studio, fiz todos os procedimentos ditos pelo tutorial, mas quando vou compilar o codigo, aparece uma janela de erro com a seguinte menssagem: ... A Project with an output Type of class library cannot be started directly.

In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. ...

porém, durante a instalação teve um dos programas que nao pode ser instalado, era o HAXM, imagino que o problema seja esse, só que já tentei instalar baixando direto d site, e pelo instalador do xamaraim, mas nao funcionou, pelo que eu entendi parece que as configurações do meu pc nao rodam ele, queria saber, se esse erro é realmente por nao ter instalado o HAXM???, e se for tem alguma forma de eu contornar isso, tem alguma vesão mais antiga dele que eu possa instalar, e se o problema for outro, como resolvo, segue as configurações do meu pc: Intel(R) Celeron (R) CPU 900 @2.20Ghz 2.19Ghz Ram 4,00 GB windows 7 64 bits

3 respostas

Olá, George!

A mensagem A Project with an output Type of class library cannot be started directly significa que você está tentando executar um projeto do tipo Class Library da sua solução. Provavelmente você está com o projeto PCL (portable class library) marcado em negrito. Uma class library é um projeto que dá suporte a um outro executável, mas uma class library não pode ser o ponto de partida para execução de um programa. Pra resolver isso, basta clicar com o botão direito sobre o projeto xxxxx.Droid, e escolher a opção de menu Set As Startup Project.

Quanto ao HAXM, isso é um problema diferente. Se o Visual Studio ainda estiver reclamando da falta do HAXM (Inter Hardware Accelarated Execution Manager), que é usado pra rodar o emulador do Android, por exemplo, você vai ter que baixar o setup de instalação do Xamarin em https://www.xamarin.com/download, preencher seus dados e escolher a opção "I Already Have Visual Studio Installed". Uma das instalações do Xamarin é justamente o HAXM.

Um abraço

enquanto ao erro deu certo, só que enquanto ao haxm, nao consigo instalar ele, toda vez que vou instalar pelo instalador do xamarim, acontece um erro, o erro diz o seguinte :

Installation of 'Intel® HAXM' failed with more than one exception (attempt 3) Errors while installing items. Exception type: System.AggregateException Installation of software item 'Intel® HAXM' failed with exception. Exception type: Xamarin.Web.Installer.InstallException Full stack trace: at Xamarin.Web.Installer.Installer.BaseSoftwareItem.InstallDownloadedItem(String url, InstallationArchiveHandler handler, DownloadServiceWorkItem download) at Xamarin.Web.Installer.Installer.BaseSoftwareItem.Install(UInt32 tryNumber) at WindowsInstaller.ProgressPage.InstallationWorker() Installation of software item 'Intel® HAXM' failed with exception. Exception type: Xamarin.Web.Installer.InstallException Full stack trace: at Xamarin.Web.Installer.Installer.BaseSoftwareItem.InstallDownloadedItem(String url, InstallationArchiveHandler handler, DownloadServiceWorkItem download) at Xamarin.Web.Installer.Installer.BaseSoftwareItem.Install(UInt32 tryNumber) at WindowsInstaller.ProgressPage.InstallationWorker() Installation of software item 'Intel® HAXM' failed with exception. Exception type: Xamarin.Web.Installer.InstallException Full stack trace: at Xamarin.Web.Installer.Installer.BaseSoftwareItem.InstallDownloadedItem(String url, InstallationArchiveHandler handler, DownloadServiceWorkItem download) at Xamarin.Web.Installer.Installer.BaseSoftwareItem.Install(UInt32 tryNumber) at WindowsInstaller.ProgressPage.InstallationWorker()

UUUUPPPPPPPPPPPPPPPPPPPPPPPPP

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software