Skip to content

Commit 354d31f

Browse files
ChristophLindemannjeffkl
authored andcommitted
Set LanguageTargets to Microsoft.Common.targets in NoTargets (#43)
Microsoft.Common.targets was not imported into NoTargets SDK projects (#42), resulting in some functionality like Nuget build extensions (#41) and Directory.Build.targets (#40 ) not working correctly. Fixes #40 Fixes #41 Fixes #42
1 parent 27c44e0 commit 354d31f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/NoTargets/Sdk/Sdk.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
-->
77
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
88

9+
<!--
10+
Setup LanguageTargets to include Microsoft.Common.targets
11+
Normally Microsoft.Common.targets is imported via the Language specific targets, but the
12+
NoTargets SDK does not have any "language", so we import the common targets directly
13+
-->
14+
<PropertyGroup>
15+
<LanguageTargets Condition="'$(LanguageTargets)' == ''">$(MSBuildToolsPath)\Microsoft.Common.targets</LanguageTargets>
16+
</PropertyGroup>
17+
918
<Import Project="$(CustomBeforeNoTargets)" Condition="'$(CustomBeforeNoTargets)' != '' and Exists('$(CustomBeforeNoTargets)')" />
1019

1120
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" Condition=" '$(CommonTargetsPath)' == '' " />

0 commit comments

Comments
 (0)