ionide / KeepAChangelog

Parser and MSBuild Targets for using Keep-A-Changelog-formatted Changelogs in your Build
MIT License
28 stars 4 forks source link

0.2.0 is missing FSharp.Core reference #23

Open nojaf opened 7 months ago

nojaf commented 7 months ago

The 0.2.0 upgrade did not work in https://github.com/ionide/ionide-analyzers/actions/runs/7107720510/job/19349694041?pr=49

dotnet build --no-restore -c Release ionide-analyzers.sln
MSBuild version 17.8.3+195e7f5a3 for .NET
/home/runner/.nuget/packages/ionide.keepachangelog.tasks/0.2.0/build/Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4062: The "Ionide.KeepAChangelog.Tasks.ParseChangeLogs" task could not be loaded from the assembly /home/runner/.nuget/packages/ionide.keepachangelog.tasks/0.2.0/build/../tasks/net6.0/Ionide.KeepAChangelog.Tasks.dll. Could not load file or assembly 'FSharp.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/home/runner/work/ionide-analyzers/ionide-analyzers/src/Ionide.Analyzers/Ionide.Analyzers.fsproj]
/home/runner/.nuget/packages/ionide.keepachangelog.tasks/0.2.0/build/Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/home/runner/work/ionide-analyzers/ionide-analyzers/src/Ionide.Analyzers/Ionide.Analyzers.fsproj]

image

This seems to be different to what 0.1.8 had: image

I would suspect that either it needs the dependencies or the binaries.

baronfel commented 7 months ago

I'll unlist 0.2.0 in the meantime, but I won't be able to look at this for several days.

nojaf commented 7 months ago

I can try and take a look if you like. What should the outcome be of this? References or all libraries copied into the nupkg?

baronfel commented 7 months ago

All references should be copied for each TFM - nuget should not list any dependencies because they should be internalized to the package (aka setting PrivateAssets=all on the PackageReferences). The net472 target in 0.2.0 looks fine, but the net6.0 one looks wrong to me.

nojaf commented 7 months ago
dotnet msbuild C:\Users\nojaf\Projects\KeepAChangelog\src\Ionide.KeepAChangelog.Tasks\Ionide.KeepAChangelog.Tasks.fsproj  /t:CopyProjectReferencesToPackage /p:TargetFramework=net6.0 --getItem:ReferenceCopyLocalPaths

does indeed not contain all the assemblies, while /p:TargetFramework=net472 does.