3 files with the "TemporaryGeneratedFile_" prefix are automatically generated by the Microsoft.WorkflowBuildExtensions.targets file, which is most likely imported through the chain:
- *. csproj →
- Microsoft.CSharp.targets →
- Microsoft.Common.targets →
- Microsoft.WorkflowBuildExtensions.targets
They are generated in the intermediate output path specified by the $(IntermediateOutputPath) property of MSBuild, usually something like obj\debug . One way to deal with StyleCop warnings / errors about these automatically generated files is to tell StyleCop to skip any * .cs files in $(IntermediateOutputPath) . For example, include the following element in the project:
<ItemGroup> <ExcludeFromStyleCop Include="$(IntermediateOutputPath)\**\*.cs" /> </ItemGroup>
ExcludeFromStyleCop is the name of the element recognized by the StyleCop.targets file to exclude files from analysis during assembly (at least for StyleCop 4.7). The double asterisk ** is the MSBuild syntax for searching recursively in a folder.
The new item may appear in Solution Explorer in Visual Studio. If this is not desired, it can be hidden using the Visible metadata:
<ItemGroup> <ExcludeFromStyleCop Include="$(IntermediateOutputPath)\**\*.cs" > <Visible>False</Visible> </ExcludeFromStyleCop> </ItemGroup>
A similar approach can be used to exclude other files, if necessary. Hope this helps.
Vlado Feb 23 '13 at 9:23 2013-02-23 09:23
source share