-
Notifications
You must be signed in to change notification settings - Fork 13
/
hello-world.csproj
46 lines (40 loc) · 1.57 KB
/
hello-world.csproj
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
<Project DefaultTargets="Build;CopyFiles" Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>hello_world</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- set EnableDefaultCompileItems to false -->
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<!-- copy file ./data/NLog.config to $(OutDir)/NLog.config -->
<Target Name="CopyFiles">
<Copy SourceFiles="./data/NLog.config" DestinationFolder="$(OutDir)" />
</Target>
<!-- specify the source files to be used for this project -->
<ItemGroup>
<Compile Include="src/*.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="lib\library.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="5.0.2" />
</ItemGroup>
<!-- copy file ./data/NLog.config to target directory -->
<!---
This creates a directory ./data/ with file NLog.conf in the $(OutDir).
But we want ./data/NLog.config to be copied to $(OutDir)/NLog.config
instead of $(OutDir)/data/NLog.config.
So, we define a target named CopyFiles and add it tot the project's
DefaultTargets.
<ItemGroup>
<None Update="./data/NLog.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
-->
<!-- create a single binary file that contains all we need to run the app -->
<PropertyGroup>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>
</Project>