How can I choose the "Startup object" in project properties while the listbox is empty?

Eric Ouellet picture Eric Ouellet · Mar 20, 2014 · Viewed 26.3k times · Source

I have a WPF project which I try to make it a single instance app using the recipe with Microsoft.VisualBasic dll described by Dale Ragan here at StackOverflow

Doing so in Visual Studio 2013 with Framework 4.5 give me 2x the same error while compiling: "... has more than one entry point defined..." for each entry point. Then I though that I would see both entry points in the comboBox choices of my "Startup Object" item of "Application" tab of my project properties. But it is empty. Why the "StartUp object" comboBox is empty and how to set the entry point? Could it be a Microsoft bug?

Additional information: - The 2 files with entry points are "App.g.cs" (auto generated) and my newly defined class with entry point - main : "EntryPoint.cs"

Answer

Kai Neugebauer picture Kai Neugebauer · Mar 16, 2018

I've solved the problem by hacking the csproj file:

<PropertyGroup>
  <StartupObject>Test.Program</StartupObject>
</PropertyGroup>