dotnet / corert

This repo contains CoreRT, an experimental .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying compiler toolchain.
http://dot.net
MIT License
2.91k stars 511 forks source link

Platform linker not found #5599

Closed CliffordSimak closed 6 years ago

CliffordSimak commented 6 years ago

Hello! I just downloaded new version of VS2017 Enterprise. And now my program based on Building a WebAPI app with CoreRT does not publish.

upd: SampleWebApi gives me the same issue

PS C:\Users\Username\source\repos\TestApp\TestApp> dotnet publish -c Release -r win-x64

  Restore completed in 75,88 ms for C:\Users\Username\source\repos\TestApp\TestApp\TestApp.csproj.
  Restore completed in 35,84 ms for C:\Users\Username\source\repos\TestApp\TestApp\TestApp.csproj.
  TestApp-> C:\Users\Username\source\repos\TestApp\TestApp\bin\Release\netcoreapp2.0\win-x64\TestApp.dll
C:\Users\Username\.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-26322-01\build\Microsoft.NETCore.Native.Windows.props(103,5): error : Platform linker not found. To fix this problem, download and install Visual Studio 2017 from http://visualstudio.com. Make sure to install the Desktop Development for C++ workload. [C:\Users\Username\source\repos\TestApp\TestApp\TestApp.csproj]

The program worked in the morning 🤷‍♂️

C:\Users\Username>ver

Microsoft Windows [Version 10.0.16299.309]
VS2017 Enterprise 15.6.3
.NET Framework 4.7.02556
C:\Users\Username>dotnet --version
2.1.102
C:\Users\Username>dotnet --info
Product Information:
 Version:            2.1.102
 Commit SHA-1 hash:  xxx

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.102\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.6
  Build    : xxx
jkotas commented 6 years ago

Have you checked Desktop Development for C++ when installing the VS Enterprise? Could you please open x64 Native Tools Command Prompt for VS 2017 (you should see a shortcut to it in your start menu) and run where link.exe in it?

ShiningDev commented 6 years ago

Maybe you need to update Desktop Development for C++

CliffordSimak commented 6 years ago

Thanks guys, I updated Desktop Development for C++ and it works. I dont know why VS deleted myC++` libraries.