zoukankan      html  css  js  c++  java
  • 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?

    Ask Question

    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

    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: 佐々木隆幸

  • 相关阅读:
    JAVA中的多态
    JAVA中的策略模式strategy
    JAVA中的clone方法剖析
    JAVA虚拟机中的堆内存Heap与栈内存Stack
    JAVA垃圾回收分代处理思想
    JAVA 垃圾回收机制
    JAVA内存管理
    混迹于博客园很久了,今天终于有了自己的博客园:coding-of-love 嘿嘿
    小程序富文本wxParse转换不成功的解决办法,填坑
    elementui级联选择器 如何设置多选?
  • 原文地址:https://www.cnblogs.com/grj001/p/12222961.html
Copyright © 2011-2022 走看看