"Exclude From Project" renames file?!


  • I am running VS Pro 2013

    In Solution Explorer, when I right-click a file then select "Exclude From Project" it does exclude it. However, it also renames the file on disk (i.e., adds a ".exclude" extension).

    This behavior is not desirable to me, as I want to Exclude inside VS but I do not want to rename the file on disk.

    Apparently this has to do with file extensions.

    If I exclude a .xml file or a .txt from my Console App project, it gets renamed with the ".exclude" extension.

    If, however, I exclude a .cs file, it does not.

    Is there a way to alter this behavior?

    • Edited by Dick Dee Tuesday, September 13, 2016 2:53 PM further clarification
    Tuesday, September 13, 2016 2:39 PM


  • Hi Dee,

    Thanks for your post.

    For this question, I tried to reproduce this on my VS 2013 Professional, but the result on my side is different from yours:

    Add a .txt file then by selecting "Exclude From Project", the suffix name doesn't change at all.

    Please try the steps as mine to see the result could change.

    Besides, you may go to Control Panel to repair your Visual Studio at first

    Then start VS in safemode and check if the issue occurs again.

    If in safe mode this issue disappeared, the cause should be third-party applications, services or Visual Studio Add-ins.
    Please also try devenv /resetsettings or devenv /setup in Command Prompt.

    If the problem still persists,  I need you installation log file to troubleshoot this issue,

    please use to gather the installation logs. After using it, you will find from %temp% folder. Please upload the file to share the link here.

    Best Regards,

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Wednesday, September 14, 2016 6:15 AM