Running winforms client, does not start iisexpress with the referenced wcf service
Running winforms client, does not start iisexpress with the referenced wcf service - under Windows 10. Ideas?
I have a vs solution with 2 projects - WinForms client, and WCF Service. Since visual studio 2013 to 2019 (I was under Windows 7), every time when I ran in debug the WinForm client, VS automatically was starting the IISExpress in background(I want that!), and my calls from the client were successful, stopping on breakpoints inside the WCF service easy.
Last week, I got new box with Windows 10. Now when I start the client, there is no iisexpress. The source code is the same and not changed - my co-workers are under Windows 7 and this works for them - same code - we use git as version control.
The only time I see iisexpress is if I do "Update Service Reference" or I make the WCF startup project and run it.
Can you help me identify why this functionality stopped working? Ideas for a fix?
Windows 10, Visual Studio 2019 Enterprise, .NET 4.6
EDIT: I do not have problem running the webservice in IISExpress, when i specifically run it - it works, also on solution level if I set 2 startup projects, all will work. The main issue is that with Single Startup project - thw WinForms client, Visual Studio will not bring up the IISExpress instance. It is only development time issue, and this works for my co-workers.
67811 gold badge55 silver badges1717 bronze badges
-
Does this answer your question? Cannot run web application on Windows 10 using IIS Express – rene Dec 3 '19 at 8:00
-
Nop. see my EDIT paragraph. – Nik Todorov Dec 4 '19 at 19:23
The solution is in the VS generated (regenerated if missing) user file in the WCF project .csproj.user there is property
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
It must be True, but now it is defaulted to False. The *.user files do not go to version control, and if they are missing VS regenerates them, hence my coworkers had it, and my freshly cloned repo did not.
I'm pretty sure I never touched this file or did any configs like that on the WCF project, my suspicion is that MS decided to start defaulting to False in some version or patch.
WARNING! After changing the option, close/open the entire solution or restart VS.
Disclaimer: I found this solution in the build in VS report problem button leading to a portal with reported problems and solutions. I do not see how to copy link or anything from that Feedback tool, but this is the guy that deserves the credit: 佐々木隆幸