views:

350

answers:

2

Hi,

I have a Visual Studio 2008 project where some code files are generated with each build (a parser, integrated via MSBuild aka editing the *.csproj file). VS does not know about the generated nature of these files (i.e. they are not the result of a "Custom Tool). So they "change" with every build, naturally. And VS2008 asks me after every build if I would like to reload those files:

This file has been modified outside the source
Do you want to reload it?

That would be ok if I had one of those files opened and in front of me, but I get these modal dialogs even with none of the code files opened.

So my question is: Is there a way to disable this dialog, per project, per solution or globally?

Thanks!

+4  A: 

Tools / Options / Documents / Detect when a file is changed outside the environment

Tim Sylvester
Thanks, worked ^^
SealedSun
A: 

I generate source files on every build, and I don't (normally) get a "file has been modified" message if the file is not open in the editor.

I was getting it just now, however, on a closed file. (That's why I went searching for this question.)

I think that's a bug. The file seems to get wedged sometimes. (But this is the first time it has happened in about a year.)

I think I've found a work-around just now: Open the offending file and then close it again.

The point is, you shouldn't need to turn off changed file detection.

dangph