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

F# projects are not supported #191

Closed
tastyeggs opened this issue Jun 15, 2022 · 3 comments
Closed

F# projects are not supported #191

tastyeggs opened this issue Jun 15, 2022 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tastyeggs
Copy link

For the following fsproj file:

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)'=='Release'">
        <Version>1.0.0</Version>
    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
    <IsPackable>True</IsPackable>
  </PropertyGroup>

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

  <ItemGroup>
    <PackageReference Include="NuGetizer" Version="0.8.0" />
  </ItemGroup>
</Project>

Running the following command:

PS ...\LibLangFsharp\src> dotnet build -c Release
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\6.0.301\FSharp\Microsoft.FSharp.NetSdk.targets(60,77): error MSB4057: The target "_GetFrameworkAssemblyReferences" does not exist in the project. [...\LibLangFsharp\src\LibLangFsharp.fsproj]
C:\Program Files\dotnet\sdk\6.0.301\FSharp\Microsoft.FSharp.NetSdk.targets(60,77): error MSB4057: The target "_GetFrameworkAssemblyReferences" does not exist in the project. [...\LibLangFsharp\src\LibLangFsharp.fsproj]

Build FAILED.

The nugetize command however succeeds.

@tastyeggs tastyeggs changed the title Error during pack: The target "_GetFrameworkAssemblyReferences" does not exist in the project F# projects are not supported Jun 15, 2022
@7enderhead
Copy link

I can confirm this behaviour.

@kzu
Copy link
Member

kzu commented Jul 14, 2022

I've no idea why that target is being referenced, but it's part of the F# SDK: https://github.com/dotnet/fsharp/blob/main/src/FSharp.Build/Microsoft.FSharp.NetSdk.targets#L60

So, it doesn't look like it's something I can fix on my end. Not sure what would trigger that target to attempt to run when nugetizer is installed, though :(

It also looks like they have SDK Pack specific targets too (see TargetsForTfmSpecificContentInPackage in that same targets file).

I'm not familiar with F# as to know how it packs what would need changing for it to work with nugetizer, I'm afraid.

Happy to take a PR, though!

@kzu kzu added enhancement New feature or request help wanted Extra attention is needed labels Jul 14, 2022
@kzu
Copy link
Member

kzu commented Feb 4, 2023

Would work on this if sponsored to do so. See https://github.com/sponsors/Devlooped

Thanks.

@kzu kzu closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2023
@devlooped devlooped locked and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants