diff options
3 files changed, 13 insertions, 0 deletions
diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props index 4c72de1d8..69539c5e1 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props @@ -80,5 +80,11 @@ See the LICENSE file in the project root for more information. <LinkerArg Include="-dynamiclib" Condition="'$(TargetOS)' == 'OSX' and '$(NativeLib)' == 'Shared'" /> <LinkerArg Include="-shared" Condition="'$(TargetOS)' != 'OSX' and '$(NativeLib)' == 'Shared'" /> </ItemGroup> + + <Exec Command="command -v $(CppLinker)" IgnoreExitCode="true"> + <Output TaskParameter="ExitCode" PropertyName="_WhereLinker"/> + </Exec> + <Error Condition="'$(_WhereLinker)' != '0' and '$(TargetOS)' == 'OSX'" Text="Platform linker ('$(CppLinker)') not found. Try installing Xcode to resolve the problem." /> + <Error Condition="'$(_WhereLinker)' != '0' and '$(TargetOS)' != 'OSX'" Text="Platform linker ('$(CppLinker)') not found. Try installing $(CppLinker) or the appropriate package for your platform to resolve the problem." /> </Target> </Project> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props index 9949a24ec..0182d5518 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props @@ -76,5 +76,10 @@ See the LICENSE file in the project root for more information. <LinkerArg Include="/OPT:REF" /> <LinkerArg Include="/OPT:ICF" /> </ItemGroup> + + <Exec Command="where /Q $(CppLinker)" IgnoreExitCode="true"> + <Output TaskParameter="ExitCode" PropertyName="_WhereLinker"/> + </Exec> + <Error Condition="'$(_WhereLinker)' != '0'" Text="Platform linker not found. Make sure to publish from a x64 Native Tools Command Prompt for VS 2017 with C++ tools installed." /> </Target> </Project> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index 4a334e624..6e03efac7 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -166,6 +166,8 @@ See the LICENSE file in the project root for more information. <MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(NativeObject)))" /> + <Message Text="Generating native code" Importance="high" /> + <Exec Command=""$(IlcPath)\tools\ilc" @"$(NativeIntermediateOutputPath)%(ManagedBinary.Filename).ilc.rsp"" /> </Target> |