简体   繁体   中英

VS 2017 15.8 update broke Publish Selected Files

I can no longer publish selected files in Visual Studio after upgrading to VS 2017 15.8 . The keyboard shortcut Alt + ; then Alt + P gives an error and the if I right click on file in the Solution Explorer it no longer shows an option in the Context menu for "Publish [filename]"

The error message from the keyboard shortcut is "The key combination (Alt+;, Alt+P) is bound to command (Publish selected files) which is not currently available .

Any workaround?

This bug was found back in April 2017 in Visual Studio 2017 15.1 and was fixed in 15.3 . I believe they will fix this again in upcoming updates.

Partial workaround found on github :
Sample to skip specific folders and files during Web Deploy Publish

<ItemGroup>

    <MsDeploySkipRules Include="CustomSkipFolder1">
        <ObjectName>dirPath</ObjectName>
        <AbsolutePath>wwwroot</AbsolutePath>
    </MsDeploySkipRules>

    <MsDeploySkipRules Include="CustomSkipFolder2">
        <ObjectName>dirPath</ObjectName>
        <AbsolutePath>wwwroot\\Content$</AbsolutePath>
    </MsDeploySkipRules>

    <MsDeploySkipRules Include="CustomSkipFile1">
        <ObjectName>filePath</ObjectName>
        <AbsolutePath>Views\\Home\\About.cshtml</AbsolutePath>
    </MsDeploySkipRules>

    <MsDeploySkipRules Include="CustomSkipFile2">
        <ObjectName>filePath</ObjectName>
        <AbsolutePath>Views\\Home\\About2.cshtml</AbsolutePath>
    </MsDeploySkipRules>

</ItemGroup>

Version 15.8.2, which I installed yesterday, comes with a fix. The shortcut should work again for everyone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM