none
The application could not be started. Converting Wcf application to Console Application RRS feed

  • Question

  • I have initially created a WCF Application in C# using VS2012. I have now converted the application to a Console Application hosting the WCF service inside a Windows Service that can run as a console application or as a Windows Service (if installed). The name of the initial WCF Service is MyWcfProject.

    My problem is that I cannot start the MyWcfProject.exe after converting it to a console application, the error I'm getting is :

    The application could not be started.
    Do you want to view information about this issue?

    The weird thing is that I can run the same project if I rename the project from MyWcfProject to MyConsoleWcfProject.exe. Any ideas?

    The complete project name is : BigName.ProjectName. If I change the assembly name to anything other than *.ProjectName, like simpleProjectName.exe, it works.

    The Event Viewer on Windows shows no specific error, I don't know how to debug this.

    Monday, June 27, 2016 12:11 PM

All replies

  • It is probably executing a different MyWcfProject than what you assume it is.


    Sam Hobbs
    SimpleSamples.Info

    Monday, June 27, 2016 5:18 PM
  • Hi acalin,
    Thank you for posting here.
    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.
    Since your issue is about WCF forum, I will move your thread to that forum for better support. If you have any problem related, please feel free to post.
    Thanks for your understanding.
    Best Regards,
    Hart

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Tuesday, June 28, 2016 2:08 AM
  • Hi acalin,

    What do you mean about converting the WCF Service to the Console Application? Do you mean that you host the WCF Service inside the Console Application? If so, could you please tell me how do you implement the coverting? If not, could you please show more detailed information about your problem in here.
    Thanks for your understanding.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 4, 2016 9:27 AM
    Moderator