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

Consider targetting .NET 6 as well #799

Closed
kMutagene opened this issue Feb 23, 2023 · 8 comments · Fixed by #796
Closed

Consider targetting .NET 6 as well #799

kMutagene opened this issue Feb 23, 2023 · 8 comments · Fixed by #796

Comments

@kMutagene
Copy link
Contributor

since v17, fsdocs-tool only supports .NET 7. This can cause problems especially in projects where FAKE is being used, as FAKE targets .NET6 and will not work due to incompatible msbuild log formats when running with the .NET 7 sdk. Should there be no .NET 7 exclusive code i'd suggest multi-targetting frameworks here:

<TargetFramework>net7.0</TargetFramework>

to

 <TargetFrameworks>net6.0;net7.0</TargetFrameworks>

or even only targetting .net 6, as that is the LTS release anyways

@nojaf
Copy link
Collaborator

nojaf commented Feb 23, 2023

Hello,

Thank you for bringing this up. This may not be possible because we depend on MSBuild bits for project cracking. @baronfel any thoughts?

@TheAngryByrd
Copy link

I think it's possible but we need to set the Microsoft.Build to copy_local: false.

# copy_local: false excludes runtime assets (desired for msbuild)
nuget Microsoft.Build copy_local: false
nuget Microsoft.Build.Framework copy_local: false
nuget Microsoft.Build.Utilities.Core copy_local: false
nuget Microsoft.Build.Tasks.Core copy_local: false

ionide/proj-info#178

@nojaf
Copy link
Collaborator

nojaf commented Feb 24, 2023

We would first need to have #796 right?
As our current version of FCS would pull down those dependencies anyway.

@TheAngryByrd
Copy link

We would first need to have #796 right? As our current version of FCS would pull down those dependencies anyway.

I don't think we need it for just this. The dependencies for Ionide.ProjInfo.FCS are FSharp.Compiler.Service(>= 41.0.5)

image

@nojaf
Copy link
Collaborator

nojaf commented Feb 24, 2023

Yeah, until you actually install it.
Tried this console app:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
    <RootNamespace>oh_jimmy</RootNamespace>
     <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Program.fs" />
  </ItemGroup>

  <ItemGroup>
  <PackageReference Include="Ionide.ProjInfo.FCS" Version="0.61.2" />
  <PackageReference Update="FSharp.Core" Version="6.0.5" />
</ItemGroup>
</Project>

Lock file says:

      "FSharp.Compiler.Service": {
        "type": "Transitive",
        "resolved": "41.0.5",
        "contentHash": "p88YDZYJCnuQRqnWnN9kcklHzEVy0vEEnjZ0e+/fszAASEInoAzkfs4SxTTrgsw7ey+hmbkjYjvcbC8Ed1Xa4Q==",

and build output looks like:
image

I do think we need the latest FCS to get around that problem.

When I add:

  <PackageReference Update="FSharp.Core" Version="7.0.200" />
  <PackageReference Include="FSharp.Compiler.Service" Version="43.7.200" />

I don't get those MSBuild dlls.

@TheAngryByrd
Copy link

Oh because this project is on 42.7.101, yep, we need to get off that version. (Wonder if they should unlist it?)

@TheAngryByrd
Copy link

TheAngryByrd commented Feb 24, 2023

And looks like this project doesn't need Ionide.ProjInfo.FCS, just Ionide.ProjInfo and Ionide.ProjInfo.Sln so that's good.

@nojaf
Copy link
Collaborator

nojaf commented Mar 29, 2023

Available in https://www.nuget.org/packages/fsdocs-tool/18.0.0

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.

3 participants