Skip to content

Restore fails for netcoreapp5.0 projects #3811

Closed

Description

@kerams

Paket does not like the .NET 5 preview released the other day, in particular it does not recognize netcoreapp5.0 references in paket.dependencies and fsproj files.

Activity

  1. forki commented on Mar 18, 2020

    @forki
    Member
  2. added a commit that references this issue on Mar 18, 2020
    bad6058
  3. kerams commented on Mar 18, 2020

    @kerams
    ContributorAuthor

    I don't see any mention of it in the announcement blog post.

  4. forki commented on Mar 18, 2020

    @forki
    Member

    ok it's now part of the new alpha version. Please let me know if it works

  5. kerams commented on Mar 19, 2020

    @kerams
    ContributorAuthor

    Strangely, it doesn't:

    Paket version 6.0.0-alpha019
    Performance:
     - Runtime: 345 milliseconds
    Paket failed with
    -> Extracting platforms from path 'netcoreapp5.0' failed, a newer Paket version might support it, otherwise please open an issue for a missing platform handler.
    
    Paket version 6.0.0-alpha019
    Performance:
     - Runtime: 119 milliseconds
    Paket failed with
    -> Error in paket.dependencies line 5
         Could not parse framework 'netcoreapp5.0'. Try to update or install again or report a paket bug.
    
  6. forki commented on Mar 19, 2020

    @forki
    Member

    can you please copy your deps file into this?

  7. reopened this on Mar 19, 2020
  8. kerams commented on Mar 19, 2020

    @kerams
    ContributorAuthor
    group Server
        source https://api.nuget.org/v3/index.json
        framework: netcoreapp5.0
        storage: none
    
    nuget Awssdk.s3
    nuget awssdk.simpleemail
    nuget fsconfig
        nuget FSharp.Core
    nuget fsharp.data.npgsql
    nuget fspickler
    nuget fspickler.json
        nuget Giraffe
        nuget Fable.Remoting.Giraffe
    nuget Google.Apis.Texttospeech.v1beta1
    nuget Microsoft.AspNetCore.Cryptography.KeyDerivation
    nuget Microsoft.Extensions.Configuration.Ini
    nuget prometheus-net.AspNetCore
    nuget prometheus-net.DotNetRuntime
    nuget serilog
    nuget serilog.sinks.console 4.0.0-dev-00839 dev
    nuget Serilog.Sinks.Seq 5.0.0-dev-00174 dev
    nuget TaskBuilder.fs 2.2.0-alpha alpha
    
    group Client
        source https://api.nuget.org/v3/index.json
        framework: netstandard2.0
        storage: none
    
    nuget elmish.sweetalert
        nuget Fable.Core ~> 3
        nuget Fable.Elmish ~> 3
        nuget Fable.Elmish.Debugger ~> 3
        nuget Fable.Elmish.React ~> 3
        nuget Fable.Elmish.HMR ~> 4
        nuget Fable.React ~> 5
        nuget Fable.Remoting.Client ~> 5
    nuget fable.simplehttp
    	nuget Feliz.Router
        nuget Fulma
        nuget Fable.FontAwesome.Free
    nuget Fulma.Extensions.Wikiki.Checkradio
    nuget fulma.extensions.wikiki.tooltip
    	nuget Thoth.Json
    	
    group Extension
    	source https://api.nuget.org/v3/index.json
        framework: netstandard2.0
        storage: none
    
        nuget Fable.Core ~> 3
    	nuget Thoth.Json
    
    group Build
        source https://api.nuget.org/v3/index.json
        framework: netstandard2.0
        storage: none
    
    nuget Fake.IO.Zip
        nuget FSharp.Core
        nuget Fake.Core.Target
        nuget Fake.DotNet.Cli
        nuget Fake.IO.FileSystem
    	
    group Tests
        source https://api.nuget.org/v3/index.json
        framework: netcoreapp5.0
        storage: none
    nuget expecto.fscheck
    nuget expecto.testresults
    
    <?xml version="1.0" encoding="utf-8"?>
    <Project Sdk="Microsoft.NET.Sdk.Web">
      <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>netcoreapp5.0</TargetFramework>
        <LangVersion>preview</LangVersion>
        <PublishTrimmed>true</PublishTrimmed>
        <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
        <UserSecretsId>42dcc4c3-923c-4481-a432-412929bc341a</UserSecretsId>
      </PropertyGroup>
      <ItemGroup>
        <Compile Include="CompositionRoot.fs" />
        <Compile Include="Util.fs" />
        <Compile Include="Server.fs" />
      </ItemGroup>
      <ItemGroup>
        <ProjectReference Include="..\WebApiCommon\WebApiCommon.fsproj" />
      </ItemGroup>
      <Import Project="..\..\.paket\Paket.Restore.targets" />
    </Project>
    
  9. forki commented on Mar 19, 2020

    @forki
    Member

    so what's the package that's making trouble?

  10. kerams commented on Mar 19, 2020

    @kerams
    ContributorAuthor

    It's not a package-specific problem:

    paket restore --project .\src\Server\Server.fsproj
    Paket version 6.0.0-alpha019
    Performance:
     - Runtime: 120 milliseconds
    Paket failed with
    -> Error in paket.dependencies line 3
         Could not parse framework 'netcoreapp5.0'. Try to update or install again or report a paket bug.
    

    install fails too.

  11. forki commented on Mar 19, 2020

    @forki
    Member

    6.0.0-alpha020 has yet another fix

  12. kerams commented on Mar 19, 2020

    @kerams
    ContributorAuthor

    Looks good now, many thanks!

  13. added a commit that references this issue on Mar 23, 2020
    0ded416
  14. added a commit that references this issue on May 5, 2020
    4125175
  15. fwaris commented on Jun 28, 2020

    @fwaris

    <TargetFramework>net5.0</TargetFramework>

    is accepted by the project tooling and likely the future version identifier for .net 5.0 apps

    I think I heard @cartermp talk about it also but not 100% sure.

  16. cartermp commented on Jun 28, 2020

    @cartermp
    Contributor

    Yes, net5.0 is the base TFM. There will be net5.0-ios and so on for other TFMs though. You can read about it here: https://devblogs.microsoft.com/dotnet/announcing-net-5-preview-4-and-our-journey-to-one-net/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions