Prevent iisexpress from running the websites in a solution when the startup app is a console app

后端 未结 5 1137
不知归路
不知归路 2021-01-03 18:03

I have a solution with a number of projects in it. Even if I set the web project\'s start options to:

  1. Don\'t open a page. Wait for a request from an external a
5条回答
  •  醉酒成梦
    2021-01-03 18:41

    To extend @Aleksey L.'s answer, you can actually do this with a plain text editor like Notepad.

    In your projectname.csproj.user file, make sure your the AlwaysStartWebServerOnDebug node has a value set to False.

    projectname.csproj.user

      
      
        
          
            
                ..          
              False
                ..          
            
          
        
      
    
    

    Alternatively, to do this without a text editor you can use Powershell

    $file = 'projectname.csproj.user'
    $x = [xml] (Get-Content $file)
    $x.Project.ProjectExtensions.VisualStudio.FlavorProperties.WebProjectProperties.AlwaysStartWebServerOnDebug = 'False'
    $x.Save($file)
    

提交回复
热议问题