![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | MSBuild Include Exclude File List I've been googling (:::::err binging) for a bit now, and cannot figure out the magic syntax. C:\MySolution1\ C:\MySolution1\MyProject1\ C:\MySolution1\MyProject2\ C:\MySolution1\MyProject3\ C:\MySolution1\StrongDataSets\ $(SolutionDirectory) points to C:\MySolution1\ I want to a. include all .cs files under (and nested in folders) in $(SolutionDirectory) (aka, all the .cs files in C:\MySolution1\MyProject1\ C:\MySolution1\MyProject2\ C:\MySolution1\MyProject3\ ) b. I want to exclude all instances of: Designer.cs c. I want to exclude all instances of: AssemblyInfo.cs d. I want to exclude a specific subfolder: C:\MySolution1\StrongDataSets\ (or $(SolutionDirectory)\StrongDataSets) (because of the amount of auto generated code that comes along with any strong datasets) I haven't even got b. and c. to work at the same time. Below is my (b.) and (c.) attempt (which doesn't include (d.)). :< <ItemGroup> <StyleCopFiles Include="$(SolutionDirectory)\**\*.cs" Exclude="$(SolutionDirectory)\**\*.Designer.cs;$(SolutionDirectory)\**\*.AssemblyInfo.cs" /> </ItemGroup> I've been through a bunch of trial and errors from this blog post: http://blogs.msdn.com/msbuild/archiv...08/546583.aspx to no avail. Any help? Thanks.......... |
My System Specs![]() |
| | #2 (permalink) |
| | RE: MSBuild Include Exclude File List I think I figured out the magically syntax! <ItemGroup> <StyleCopExcludedFiles Include="$(SolutionDirectory)\**\*.Designer.cs" /> <StyleCopExcludedFiles Include="$(SolutionDirectory)\**\*AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <StyleCopFiles Include="$(SolutionDirectory)\**\*.cs" Exclude="@(StyleCopExcludedFiles)" /> </ItemGroup> "granadaCoder" wrote: Quote: > I've been googling (:::::err binging) for a bit now, and cannot figure out > the magic syntax. > > > C:\MySolution1\ > C:\MySolution1\MyProject1\ > C:\MySolution1\MyProject2\ > C:\MySolution1\MyProject3\ > C:\MySolution1\StrongDataSets\ > > > $(SolutionDirectory) points to C:\MySolution1\ > > > I want to > a. include all .cs files under (and nested in folders) in $(SolutionDirectory) > (aka, all the .cs files in > C:\MySolution1\MyProject1\ > C:\MySolution1\MyProject2\ > C:\MySolution1\MyProject3\ > ) > > b. > I want to exclude > all instances of: > Designer.cs > > c. > I want to exclude > all instances of: > AssemblyInfo.cs > > d. > I want to exclude a specific subfolder: > C:\MySolution1\StrongDataSets\ > (or $(SolutionDirectory)\StrongDataSets) > > (because of the amount of auto generated code that comes along with any > strong datasets) > > I haven't even got b. and c. to work at the same time. > Below is my (b.) and (c.) attempt (which doesn't include (d.)). > > :< > > > <ItemGroup> > <StyleCopFiles Include="$(SolutionDirectory)\**\*.cs" > Exclude="$(SolutionDirectory)\**\*.Designer.cs;$(SolutionDirectory)\**\*.AssemblyInfo.cs" /> > </ItemGroup> > > > > I've been through a bunch of trial and errors from this blog post: > http://blogs.msdn.com/msbuild/archiv...08/546583.aspx > to no avail. > > > Any help? > > Thanks.......... |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Add include/exclude property support to Export-Csv | PowerShell | |||
| Re: gci internals: which happens first, include or exclude? | PowerShell | |||
| gci internals: which happens first, include or exclude? | PowerShell | |||
| One more question on -LiteralPath and -Include/-Exclude for GetChi | PowerShell | |||
| Exclude lines that include string | PowerShell | |||