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

Cannot build net7.0 with FSharp.Compiler.Service 42.7.100 #14283

Closed
nightroman opened this issue Nov 9, 2022 · 5 comments
Closed

Cannot build net7.0 with FSharp.Compiler.Service 42.7.100 #14283

nightroman opened this issue Nov 9, 2022 · 5 comments
Assignees
Labels
Area-FCS Area-ProjectsAndBuild MSBuild tasks, project files, framework resolution Bug Needs-Triage
Milestone

Comments

@nightroman
Copy link
Contributor

nightroman commented Nov 9, 2022

Cannot build net7.0 with FSharp.Compiler.Service 42.7.100

Repro steps

With the latest Visual Studio 17.4 and its .NET 7 SDK and templates,
in a new folder with the test project name invoke:

dotnet new console -lang f#

It creates the net7.0 console app F# project.
Then add the latest FSharp.Compiler.Service 42.7.100:

dotnet add package FSharp.Compiler.Service --version 42.7.100

It fails:

> dotnet add package FSharp.Compiler.Service --version 42.7.100
  Determining projects to restore...
  Writing C:\TEMP\TEMP\tmp1BB9.tmp
info : X.509 certificate chain validation will use the default trust store selected by .NET.
info : X.509 certificate chain validation will use the default trust store selected by .NET.
info : Adding PackageReference for package 'FSharp.Compiler.Service' into project 'C:\tmp\_221109_0646\_221109_0646.fsproj'.
info : Restoring packages for C:\tmp\_221109_0646\_221109_0646.fsproj...
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.build.framework/index.json
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.build.tasks.core/index.json
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.build.utilities.core/index.json
error: NU1102: Unable to find package Microsoft.Build.Framework with version (>= 17.4.0-preview-22469-04)
error:   - Found 42 version(s) in nuget.org [ Nearest version: 17.3.2 ]
error:   - Found 0 version(s) in MyNuGet
error:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\7.0.100\FSharp\library-packs
error: NU1102: Unable to find package Microsoft.Build.Tasks.Core with version (>= 17.4.0-preview-22469-04)
error:   - Found 42 version(s) in nuget.org [ Nearest version: 17.3.2 ]
error:   - Found 0 version(s) in MyNuGet
error:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\7.0.100\FSharp\library-packs
error: NU1102: Unable to find package Microsoft.Build.Utilities.Core with version (>= 17.4.0-preview-22469-04)
error:   - Found 42 version(s) in nuget.org [ Nearest version: 17.3.2 ]
error:   - Found 0 version(s) in MyNuGet
error:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\7.0.100\FSharp\library-packs
error: Package 'FSharp.Compiler.Service' is incompatible with 'all' frameworks in project 'C:\tmp\_221109_0646\_221109_0646.fsproj'.

To work around, add this reference manually to the project file:

  <ItemGroup>
    <PackageReference Include="FSharp.Compiler.Service" Version="42.7.100" />
  </ItemGroup>

and build

dotnet build

It fails due to not found Microsoft.Build.* packages:

> dotnet build
MSBuild version 17.4.0+18d5aef85 for .NET
  Determining projects to restore...
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102: Unable to find package Microsoft.Build.Framework with version (>= 17.4.0-preview-22469-04)
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 42 version(s) in nuget.org [ Nearest version: 17.3.2 ]
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in MyNuGet
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\7.0.100\FSharp\library-packs
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102: Unable to find package Microsoft.Build.Tasks.Core with version (>= 17.4.0-preview-22469-04)
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 42 version(s) in nuget.org [ Nearest version: 17.3.2 ]
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in MyNuGet
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\7.0.100\FSharp\library-packs
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102: Unable to find package Microsoft.Build.Utilities.Core with version (>= 17.4.0-preview-22469-04)
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 42 version(s) in nuget.org [ Nearest version: 17.3.2 ]
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in MyNuGet
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in Microsoft Visual Studio Offline Packages
C:\tmp\_221109_0646\_221109_0646.fsproj : error NU1102:   - Found 0 version(s) in C:\Program Files\dotnet\sdk\7.0.100\FSharp\library-packs
  Failed to restore C:\tmp\_221109_0646\_221109_0646.fsproj (in 271 ms).

Build FAILED.

Expected behavior

All the above commands should work and build an app, as a result.

Actual behavior

Some commands fail as described.

Known workarounds

None.

Related information

  • Operating system - Windows 10
  • .NET Runtime kind - net7.0
  • Editing Tools - Visual Studio 17.4
@vzarytovskii
Copy link
Member

Packages need to be updated to released ones, not entirely sure how they ended up in fcs.

@nightroman
Copy link
Contributor Author

Similar issues happened in the past, e.g. #12758

@nightroman
Copy link
Contributor Author

nightroman commented Nov 10, 2022

FWIW it looks like the required Microsoft.Build.* packages 17.4+ are not available on NuGet.

@T-Gro T-Gro added Contributor Pain Area-ProjectsAndBuild MSBuild tasks, project files, framework resolution Area-FCS and removed Contributor Pain labels Nov 10, 2022
@vzarytovskii vzarytovskii self-assigned this Nov 10, 2022
@vzarytovskii vzarytovskii modified the milestones: Backlog, November-2022 Nov 10, 2022
@vzarytovskii vzarytovskii moved this from Not Planned to In Progress in F# Compiler and Tooling Nov 10, 2022
@nightroman
Copy link
Contributor Author

FWIW it looks like the required Microsoft.Build.* packages 17.4+ are not available on NuGet.

Microsoft.Build.* packages 17.4 are available on NuGet.

@nightroman
Copy link
Contributor Author

New FCS 42.7.101 works, thank you!

Repository owner moved this from In Progress to Done in F# Compiler and Tooling Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-FCS Area-ProjectsAndBuild MSBuild tasks, project files, framework resolution Bug Needs-Triage
Projects
Archived in project
Development

No branches or pull requests

3 participants