Bug Report T852281
Visible to All Users

Code Cleanup - "Cleanup On Save" triggers the "changed externally" message in Visual Studio for files that were not changed

created 5 years ago

See the following report which I posted on the Visual Studio Developer Community site: https://developercommunity.visualstudio.com/content/problem/883448/visual-studio-detects-file-changes-to-files-which.html.

After reporting this, I tried disabling the CodeRush extension and could no longer reproduce. After re-enabling, the issue was easily reproduced.

Is CodeRush modifying something related to the other file or sending some sort of signal to VS to cause this? The file modified datetime does not appear to be changed.

Note , I just upgraded VS to v16.4.3 and the issue persists.

Comments (3)
AE AE
Alex Eg (DevExpress) 5 years ago

    Hi Dave,
    I reproduced the issue, and it seems that the 'Cleanup On Save' feature causes it. We need some time to research it and we will notify you as soon as we get any results.

      All good now. Thanks!

      AE AE
      Alex Eg (DevExpress) 5 years ago

        Hi Dave,
        Thank you for the update. I'm happy to hear that the issue is resolved. Please do not hesitate to ask if you need any assistance with our products!

        Answers approved by DevExpress Support

        created 5 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Show previous comments (3)
          DevExpress Support Team 5 years ago

            Hello,

            Thank you for sharing files containing your settings. I have tried the following steps to replicate this issue. However, I still could not reproduce it locally.
            I cloned the https://github.com/icsharpcode/ILSpy repository and tried to save several files, I cleaned up each saved file, but I did not see the dialog that said about external file modifications. Please take a look at this screencast: https://monosnap.com/file/gzSL4LHoMEebtzE4EDBiG8MPziznax. I suggest that you try the same steps and see if the issue is reproducible on your machine.

            Please also disable code cleanup rules one by one and check if there is a specific rule which might be related to the issue.

              Tracking it further… it appears when using Ctrl-S to save and multiple files need to be 'cleaned.' The tabs still have the star(* ) indicating that those files were cleaned, but not saved. Will still try eliminating rules to track it further as well.

              DevExpress Support Team 5 years ago

                Hello,

                Thank you for additional information. Please check specific code cleanup rules - they may affect the problem. This will help us find the root cause of the issue.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.