RunCommand not found on WCF IIS library project when trying to debug

Torben Koch 1 Reputation point
2021-09-08T13:59:54.937+00:00

hey guys... i'm currently trying to migrate from the old csproj pattern to the new one to compress the file and ... various other countless improvements for developers.

It works actually quite nice till the point of debugging. i just can't debug it as i used to, because it keeps telling me "RunCommand not found". i do understand this error, it basically means i need to run an application which calls my WCF library to debug it.

before migrating it worked, but with the new SDK pattern i'm afraid visual studio does not really understand that i want to run this as an IIS application.

so my question now is: how do I debug an iis application using visual studio when the application is a library?

i even tried to "hack" myself to execute the w3wp.exe process but not even that worked... i'm quite desperate and i don't know where to ask anymore. please help me

UPDATE:
the reproduction steps are quite easy. create a WCF web application project (it needs to have a global.asax as entry point, it should be a library). go to the csproj and manually change it to the <project sdk="Microsoft.NET.Sdk.Web">...</project>
you can also choose the Microsoft.NET.Sdk, the result will be different but it will still fail.

Windows development | Internet Information Services
Developer technologies | Visual Studio | Debugging
Developer technologies | .NET | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. PengGe-MSFT 3,381 Reputation points
    2021-09-09T03:45:34.377+00:00

    Hi @Torben Koch

    Welcome to Microsoft Q&A!

    I tried to create a library project but could not reproduce your issue.

    Regarding "RunCommand not found", I did not find information about this error, it may be related to the migration of the project, you can refer to this document.

    Regarding your other question, "how do I debug an iis application using visual studio when the application is a library", you can refer to Debug DLLs in Visual Studio.

    Sincerely,
    Peng
    *
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread


  2. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2021-09-10T15:43:40.563+00:00

    as WCF is a dead technology, it is unlikely that the visual studio team would spend time adding new project support for it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.