Skip to content

Commit e47c4a5

Browse files
authored
Fix import ordering of design-time build targets for NoTargets with .proj extension (#413)
Fixes #407
1 parent 252b324 commit e47c4a5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/NoTargets/Sdk/Sdk.targets

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
<PropertyGroup>
2525
<!-- Don't include build output in a package since NoTargets projects don't emit an assembly. -->
2626
<IncludeBuildOutput Condition="'$(IncludeBuildOutput)' == ''">false</IncludeBuildOutput>
27+
28+
<!-- For CPS/VS support. See https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.Managed.DesignTime.targets#L60 -->
29+
<CustomBeforeMicrosoftCommonTargets Condition="'$(ManagedLanguageTargetsGotImported)' == '' And Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets')">$(CustomBeforeMicrosoftCommonTargets);$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets</CustomBeforeMicrosoftCommonTargets>
2730
</PropertyGroup>
2831

2932
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" Condition=" '$(CommonTargetsPath)' == '' " />
@@ -65,10 +68,6 @@
6568
-->
6669
<Target Name="ComputeIntermediateSatelliteAssemblies" />
6770

68-
<!-- For CPS/VS support. See https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DesignTimeTargets/Microsoft.Managed.DesignTime.targets#L60 -->
69-
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets"
70-
Condition="'$(DebuggerFlavor)' == '' And Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets')" />
71-
7271
<!--
7372
NoTargets projects do not build an assembly so dependent projects shouldn't get a path to the target. Override the GetTargetPath to do nothing.
7473
-->

src/NoTargets/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"inherit": true,
3-
"version": "3.6"
3+
"version": "3.7"
44
}

0 commit comments

Comments
 (0)