This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
46 lines (41 loc) · 1.88 KB
/
Directory.Build.targets
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
37
38
39
40
41
42
43
44
45
46
<!--
*.targets files are imported from Microsoft.Common.targets after
importing .targets files from NuGet packages. So, it can override properties
and targets defined in most of the build logic. They are also imported after
the csproj files are imported. -->
<Project>
<!-- Make sure the executables never get NuGet Packed. -->
<PropertyGroup Condition=" '$(OutputType)' == 'WinExe' Or '$(OutputType)' == 'Exe' ">
<!-- Exes are not packed. -->
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<ApplicationIcon>$(MSBuildThisFileDirectory)\icon.ico</ApplicationIcon>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<!--
Pull in a custom icon from a single source so all assemblies can use the same one. That way
you only have to change it in one place.
-->
<Content Condition=" '$(OutputType)' == 'WinExe' Or '$(OutputType)' == 'Exe' " Include="$(MSBuildThisFileDirectory)\icon.ico" Visible="true" Pack="true" PackagePath=""/>
</ItemGroup>
<!--
The following few sections will automatically pull in images as resources.
-->
<ItemGroup>
<Content Include="**\*.png" Exclude="bin\**\*.png;obj\**\*.png" />
<Content Include="**\*.jpg" Exclude="bin\**\*.png;obj\**\*.jpg"/>
<Content Include="**\*.ico" Exclude="bin\**\*.png;obj\**\*.ico"/>
</ItemGroup >
<!--
Visual Studio WinUI has a bad habit of polluting the csproj files with a bunch of junk.
I keep seeing an issue where I know a file is in the directory but suddenly it is gone.
For some reason it adds a "<None Remove..." entry while not re-adding it back in. By
placing this here, it tends to leave your csproj alone when it comes to xaml files.
-->
<ItemGroup>
<Page Update="**\*.xaml">
<Generator>MSBuild:Compile</Generator>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Page>
</ItemGroup>
</Project>