Paket with net core 3.0 fails

Created on 2 Oct 2019  路  7Comments  路  Source: fsprojects/Paket

Description

When running as part of dotnet build for a NET Core 3.0 solution, paket fails with an error message:

Extracting platforms from path '${targetFramework}' failed, a newer Paket version might support it, otherwise please open an issue for a missing platform handler.

Strangely, when I build from Visual Studio, all is fine. And after once building from there, dotnet build works, too. Unfortunately, I cannot apply this workaround on my build agent.

The NET Core SDK version is 3.0.100.
The Paket version is 5.220.0.

Most helpful comment

@ScottHutchinson I'm trying to upgrade from netcoreapp3.0 to netcoreapp3.1. When running paket restore, I also get Extracting platforms from path 'netcoreapp3.1' failed. I can still run the project using your workaround with paket install, but restore doesn't work. Did you manage to solve it?

Edit: I found out that my global paket tool wasn't up to date, and once I got that upgraded I didn't get the paket restore error anymore.

All 7 comments

I updated Paket to 5.223.0, but that does not solve the problem.

Ok, I have found a workaround:
if I call
.paket/paket.exe install
explicitly and then follow it up by
dotnet build
it runs through.

VS does a restore when you open a solution. Maybe that updates Paket.Restore.targets behind the scenes or something?

@ModernRonin could you provide some more details - what's inside the paket dependencies file and what the solution looks like? A reproducable repo would be even better.

@isaacabraham Here's a repo that used to work, but now paket restore in VS Code gives 'Extracting platforms from path 'netcoreapp3.1' failed' when I tried to upgrade it from netcoreapp2.0 to netcoreapp3.1. It also no longer builds for me as a netcoreapp2.0 project.

Dapper Sample
How do I get it to build? Thanks

@ScottHutchinson I'm trying to upgrade from netcoreapp3.0 to netcoreapp3.1. When running paket restore, I also get Extracting platforms from path 'netcoreapp3.1' failed. I can still run the project using your workaround with paket install, but restore doesn't work. Did you manage to solve it?

Edit: I found out that my global paket tool wasn't up to date, and once I got that upgraded I didn't get the paket restore error anymore.

Yeah something similar here. Just want to update a small project from .NET Core 3.0 to 3.1. Build from VS works, dotnet build as well, paket restore also, paket install also. But fake build shows There was a problem while setting up the environment: -> Extracting platforms from path 'netcoreapp3.1' failed.

Using Paket version 5.247.4.

Was this page helpful?
0 / 5 - 0 ratings