I've got a Visual Studio 2008 project that contains files that are code-generated in a pre-build step. None of these files should be included in source control. I cannot predict how many files there are going to be, or their exact name. The generated files are included into the Visual Studio project file via a wildcard directive:
<ItemGroup>
<Content Include="CodeGen\*.xaml"/>
</ItemGroup>
Visual Studio marks all of the generated files as "new to source control", so that when you're not careful, you'll be checking the whole bunch in. By excluding the files from source control via "File >> Source Control >> Exclude selection from source control", the only thing that changes is the csproj.vspscc file; in it, there's one line per file, and a counter:
"NUMBER_OF_EXCLUDED_FILES" = "2"
"EXCLUDED_FILE0" = "CodeGen\\File1.xaml"
"EXCLUDED_FILE1" = "CodeGen\\File2.xaml"
What I'm looking for is a way to exclude all the code-generated files from source control so that Visual Studio will not recognize any file as "new" or "changed", no matter what's the content of the folder.
Source control is Perforce.