Editor overwriting Visual Studio script files?


#1

First off, thanks for any help / advice you can give me.

If I create a new class in Visual Studio, save the file and then go back into GameStudio the message pops up ‘Some game code files have been modified. Do you want to reload the assemblies?’

I click ‘Reload’ and the new script shows up in the asset view. However, going into the script shows the new script is empty, and has overwritten whatever was entered in Visual Studio.

The editor then detects another change, and after clicking ‘Reload’ again it refuses to show the code editor for ANY code files until you close and reload GameStudio.

Versions: Xenko Game Studio 2.1.2.1
Visual Studio 2017 15.6.0

Has anyone else come across this issue?

Thak


#2

I experienced this on the weekend. :rage:

Several people I have spoken to have also experienced it. I couldn’t seem to find an issue for it on github though. (https://github.com/SiliconStudio/xenko/issues).


#3

yes, also came across this… good that you found a way to reproduce it. this should become an issue on github.


#4

It is on Visual Studio end. Whenever you create a file (e.g. class), you should also build the project in VS or manually “Save All”.

For some reason, the team at Microsoft decided that the project files should only be modified in memory and not flush it to the disk. So when you create a new class, the .csproj is not updated (only its memory equivalent is). I stopped counting the number of times I created a file and then decided to commit to SVN or Git and then have a build fail because the .csproj was not modified and committed along with the changes.


#5

I’ve posted a bug report here: https://github.com/SiliconStudio/xenko/issues/672

If anyone has any similar issues please update the bug report.

Thanks

Chris