Repository navigation
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
36 lines (31 loc) · 1.98 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
36 lines (31 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<Project>
<!--
Vendored from frontier-workflow/Directory.Build.targets @ 8df00ee.
Drift check: git -C ../frontier-workflow log 8df00ee..HEAD Directory.Build.targets
(an XML comment cannot contain a double hyphen, so no short-form git flags here)
iCloud Drive guard. This repo lives under ~/Documents, which macOS syncs to iCloud Drive
("Desktop & Documents Folders"). iCloud periodically creates duplicate copies of files
named "<name> 2.cs", "<name> 3.cs", etc. The .NET SDK globs **/*.cs, so those copies get
compiled alongside the originals and break the build with duplicate-type errors. No real
source file in this repo has a space in its name, so we exclude any spaced filename from
the build. This runs in .targets (not .props) so the SDK's default item globs already
exist and can be removed from.
iCloud can also duplicate whole build-output DIRECTORIES ("obj 2/", "bin 3/") rather than
individual files. The SDK's default exclude only matches the literal "obj/**"/"bin/**"
paths, so a duplicated "obj 2/" is not excluded by default and its auto-generated
AssemblyInfo.cs collides with the real one (CS0579). No real source directory in this repo
has a name ending in " <digit>", so exclude any path passing through one, at any depth.
-->
<ItemGroup>
<Compile Remove="**/* *.cs" />
<Content Remove="**/* *.razor" />
<Content Remove="**/* *.json" />
<Compile Remove="**/* [0-9]*/**/*.cs" />
<Content Remove="**/* [0-9]*/**/*.razor" />
<Content Remove="**/* [0-9]*/**/*.json" />
</ItemGroup>
<!-- The target Frontier.Platform.Contracts packs as buildTransitive for consumers (removes
Corvus.Text.Json's analyzers). A project here reaches Corvus through a ProjectReference,
which applies no package build files, so it is imported for every project in the repo. -->
<Import Project="$(MSBuildThisFileDirectory)src/Frontier.Platform.Contracts/buildTransitive/Frontier.Platform.Contracts.targets" />
</Project>