11
11
<!-- When we're in the test harness include all '*Test.cs' files -->
12
12
<When Condition="'$(IsTestHarness)' == 'true'">
13
13
<ItemGroup>
14
- <Compile Include="$(MSBuildThisFileDirectory)**\*Test.cs" Exclude="**\bin\**\*Test.cs;**\obj\**\*Test.cs" />
14
+ <Compile Include="$(MSBuildThisFileDirectory)**\*Test.cs" />
15
15
<!-- Base test helpers -->
16
16
<Compile Include="$(MSBuildThisFileDirectory)UITestBase.cs" />
17
17
<Compile Include="$(MSBuildThisFileDirectory)TestAssembly.cs" />
18
18
<Compile Include="$(MSBuildThisFileDirectory)TestPageAttribute.cs" />
19
19
<Compile Include="$(MSBuildThisFileDirectory)VisualTreeHelper.cs" />
20
20
</ItemGroup>
21
21
</When>
22
+ <!-- Have a None Include as well to make all items visible under this Shared Project in VS IDE -->
23
+ <Otherwise>
24
+ <ItemGroup>
25
+ <None Include="$(MSBuildThisFileDirectory)**\*Test.cs" />
26
+ <!-- Base test helpers -->
27
+ <None Include="$(MSBuildThisFileDirectory)UITestBase.cs" />
28
+ <None Include="$(MSBuildThisFileDirectory)TestAssembly.cs" />
29
+ <None Include="$(MSBuildThisFileDirectory)TestPageAttribute.cs" />
30
+ <None Include="$(MSBuildThisFileDirectory)VisualTreeHelper.cs" />
31
+ </ItemGroup>
32
+ </Otherwise>
22
33
</Choose>
23
34
<Choose>
24
35
<!-- When we're in the UI app used by the test harness, include all the pages -->
25
36
<When Condition="'$(IsTestHost)' == 'true'">
26
37
<ItemGroup>
27
- <Page Include="$(MSBuildThisFileDirectory)**\*Page.xaml" Exclude="**\bin\**\*Page.xaml;**\obj\**\*Page.xaml" Link="%(RecursiveDir)%(FileName)%(Extension)" SubType="Designer" Generator="MSBuild:Compile" />
28
- <Compile Include="$(MSBuildThisFileDirectory)**\*Page.xaml.cs" DependentUpon="%(Filename)" />
38
+ <Page Include="$(MSBuildThisFileDirectory)**\*Page.xaml" SubType="Designer" Generator="MSBuild:Compile">
39
+ <!--
40
+ HACK: See Microsoft.Windows.UI.Xaml.Common.targets(540) for how XAML targets calculate 'xbf' output paths.
41
+ Without this 'Link' attribute, XAML targets use absolute path instead of relative path for 'xbf' compilation.
42
+ Thus, the build errors out with 'MSB4023' code without the 'Link' attribute below.
43
+ -->
44
+ <Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
45
+ </Page>
46
+ <Compile Include="$(MSBuildThisFileDirectory)**\*Page.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
29
47
</ItemGroup>
30
48
</When>
49
+ <!-- Have a None Include as well to make all items visible under this Shared Project in VS IDE -->
50
+ <Otherwise>
51
+ <ItemGroup>
52
+ <None Include="$(MSBuildThisFileDirectory)**\*Page.xaml" SubType="Designer" Generator="MSBuild:Compile" />
53
+ <None Include="$(MSBuildThisFileDirectory)**\*Page.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
54
+ </ItemGroup>
55
+ </Otherwise>
31
56
</Choose>
32
- <!-- Have a None Include as well to make all items visible in VS in the Shared Project -->
33
- <ItemGroup>
34
- <None Include="$(MSBuildThisFileDirectory)**\*Test.cs" Exclude="**\bin\**\*Test.cs;**\obj\**\*Test.cs" />
35
- <None Include="$(MSBuildThisFileDirectory)**\*Page.xaml" Exclude="**\bin\**\*Page.xaml;**\obj\**\*Page.xaml" SubType="Designer" Generator="MSBuild:Compile" />
36
- <None Include="$(MSBuildThisFileDirectory)**\*Page.xaml.cs" DependentUpon="%(Filename)" />
37
- <!-- Base test helpers -->
38
- <None Include="$(MSBuildThisFileDirectory)UITestBase.cs" />
39
- <None Include="$(MSBuildThisFileDirectory)TestAssembly.cs" />
40
- <None Include="$(MSBuildThisFileDirectory)TestPageAttribute.cs" />
41
- <None Include="$(MSBuildThisFileDirectory)VisualTreeHelper.cs" />
42
- </ItemGroup>
43
57
</Project>
0 commit comments