Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore fails for netcoreapp5.0 projects #3811

Closed
kerams opened this issue Mar 18, 2020 · 12 comments · Fixed by #3812
Closed

Restore fails for netcoreapp5.0 projects #3811

kerams opened this issue Mar 18, 2020 · 12 comments · Fixed by #3812

Comments

@kerams
Copy link
Contributor

kerams commented Mar 18, 2020

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.

@forki
Copy link
Member

forki commented Mar 18, 2020 via email

@kerams
Copy link
Contributor Author

kerams commented Mar 18, 2020

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

@forki forki closed this as completed in bad6058 Mar 18, 2020
@forki
Copy link
Member

forki commented Mar 18, 2020

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

@kerams
Copy link
Contributor Author

kerams commented Mar 19, 2020

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.

@forki
Copy link
Member

forki commented Mar 19, 2020

can you please copy your deps file into this?

@forki forki reopened this Mar 19, 2020
@kerams
Copy link
Contributor Author

kerams commented Mar 19, 2020

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>

@forki
Copy link
Member

forki commented Mar 19, 2020

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

@kerams
Copy link
Contributor Author

kerams commented Mar 19, 2020

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.

@forki
Copy link
Member

forki commented Mar 19, 2020

6.0.0-alpha020 has yet another fix

@kerams
Copy link
Contributor Author

kerams commented Mar 19, 2020

Looks good now, many thanks!

@fwaris
Copy link

fwaris commented Jun 28, 2020

<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.

@cartermp
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants