3

any help is really appreciated. I have a problem with Visual Studio 2017 / 2019 inside a Parallels VM under MAC OS Catalina. When I add a file (e.g. a .cs file) to project and save the file, Visual Studio complains that the project (.csproj) file has been modified outside the solution and wants to reload the project. This is really annoying...

I was thinking if this might have something to do with git. Maybe git is removing LRLF on the file and convertes it to Unix style. But playing with these settings during installation of git-scm did not solve anything for me.

My folder setup is as follows :

I have the git repos checked out on the mac in ~/Repos/myRepo The user directory is mapped to Z:\ in the parallels VM. The solution is so opened inside Visual Studio in Z:\Repos\myRepo\mySolution.sln

git is installed on the MAC as well as in the VM. Maybe these mixtures is causing the problems. But this setup worked for me for a long time. The issue occured after updating my MAC to Catalina...

Thanks for your help

  • Hi, I have the exact same issue since about 1 or 2 months. I was suspecting that some VS or Mac updates where the root, but I couldn't figure it out yet. Just found out that when I store my solution on a Windows drive everything works, but this is actually something I didn't want to do. Where you able to solve this problem? – Andreas Jan 08 '20 at 07:04
  • Unfortunately not... I still have this issue and currently live with it, but it is extremely annoying... – Robin Altrock Jan 08 '20 at 12:04

2 Answers2

1

I have the same issue, but with any file I edit. I also run VS in a VM and in my personal experience this could happen due to high disk latency (VM issue).

For VS to know when a file has been modified, it registers to be notified of changes to a file. But in order to exclude its own changes to this file (when you save the file in VS itself) it will have ignore this event. Normally the notification is triggered immediately so VS will only have to ignore this for a very short period. But if you have a high disk latency because you're running the disk over network connected to a VM, VS might have not received it in time and hence when it does receive it, it will think it's modified outside of VS.

See if you can place your solution in a location which has very low latancy, and test if it is happening again.

Unfortunately, my situation restricts me from trying anything out in order to resolve this myself. I've been looking for a setting in VS that would increase the timeout for this even, but have not found this.

bra1nDeaD
  • 11
  • 2
  • Already a little while now. Yes, it sounds reasonable that it could have to do something with disk latency. Here is my setup: I am working now on a MacBook Pro 16''(latest version) with 8TB SSD. So I assume that hardware should not be an issue at all. If I create a project on the local C: drive in parallels, everything works fine. As soon as I store my project on the mac (e.g. in the mapped documents directory), this issue pops up again. So it is either Parallels or MacOs who is doing something to slow things down? – Andreas May 27 '20 at 10:59
1

This bug is fixed in the current Parallels version (16.x or later)

I have reported this problem to parallel in 2020 January.

I sent them a sample virtual machine, they are able to reproduce the problem. Since then we got a new parallel version, but this problem was not fixed. I hope they are working on a fix, but I'm not sure about it....

This is clearly parallel's bug, because it never happened before Catalina versions (we used vs 2017 in Mojave), and by sys internal procmon the files are not modified outside visual studio.

I also can reproduce this bug with VS2017, VS2019 and other programs using visual studio shell(!) running in parallel VMs.

This bug has not related to git. I'm not using git.

Workaround:

We can use an smb share instead of parallel's virtual folder. Opening a project from smb share works and no warning for modified solution files.

Of course this is inconvenient, and may not works for some vm network config.

apr
  • 552
  • 3
  • 9
  • Hi @apr,did you receive any feedback from Parallels support yet? Just recently switched to a new Mac, but this issue is still there and kind of annoying. – Andreas May 27 '20 at 11:00
  • Signed in parallel, and the ticket status: "In Engineering". (ticket opened in 2019 Dec, bug reproduced in 2020 Jan). I think they are working on it! Just press ignore on reload warning (or use the smb share workaround), and enjoy your Mac :) – apr May 28 '20 at 12:15