-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSdk.props
More file actions
32 lines (27 loc) · 1.6 KB
/
Sdk.props
File metadata and controls
32 lines (27 loc) · 1.6 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
<Project>
<PropertyGroup Label="Define the ReadMe as being above/oustide the project cone">
<!-- For the sake of the demo, comment this out
I know it is incorrect, but the goal is to show that it does not compile anymore
because EnableDefaultCompileItems is set to false WITHOUT any warning.
The problem was discovered with a far more complex scenario where such mistake were not not invoved,
but I found this simple case allowing to reproduce the case.
<ReadMeFileName >ReadMe.md</ReadMeFileName>
-->
<!-- The repository root is where the ReadMe is found (above the project) -->
<RepositoryRoot Condition="'$(RepositoryRoot)' == ''"
>$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildProjectDirectory)', '$(ReadMeFileName)'))</RepositoryRoot>
<PackageReadMeFullPath >$(RepositoryRoot)\$(ReadMeFileName)</PackageReadMeFullPath>
<PackageReadMeFile Condition="'$(PackageReadMeFullPath)' != '' And Exists('$(PackageReadMeFullPath)')"
>$(ReadMeFileName)</PackageReadMeFile>
</PropertyGroup>
<ItemGroup>
<None Pack="true" PackagePath="" Include="$(PackageReadMeFullPath)" Condition="Exists('$(PackageReadMeFullPath)')" />
</ItemGroup>
<!--
Note that trying to force EnableDefaultCompileItems does not change anything at all.
<PropertyGroup>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>
</PropertyGroup>
-->
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
</Project>