Add CompileDesignTime target to IL.Sdk (#42794)
authorViktor Hofer <viktor.hofer@microsoft.com>
Mon, 28 Sep 2020 16:15:17 +0000 (18:15 +0200)
committerGitHub <noreply@github.com>
Mon, 28 Sep 2020 16:15:17 +0000 (18:15 +0200)
Visual Studio requires the CompileDesignTime target to be present as it is called by the language service. This fixed building ilproj projects inside Visual Studio.

src/coreclr/src/.nuget/Microsoft.NET.Sdk.IL/targets/Microsoft.NET.Sdk.IL.targets

index 4cbdc29..6a286e9 100644 (file)
@@ -143,6 +143,9 @@ Copyright (c) .NET Foundation. All rights reserved.
 
     <CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''"/>
   </Target>
+  
+  <!-- Target is called by the language server. No-op for ILProj as there is no language service support. -->
+  <Target Name="CompileDesignTime" />
 
   <!-- Import design time targets for Roslyn Project System. These are only available if Visual Studio is installed. -->
   <!-- Required for project to load in Visual Studio. -->