Open baronfel opened 2 years ago
Here we can see that GenerateNuspec
is building the _GetBuildOutputfilesWithTfm
target with a TFM set for both net472
and net6.0
, as expected. My custom targets cause ResolveReferences
to run, however only the net472
ResolveReferences is used?
Rainer helped me figure out what was going on:
CopyLocalLockFileReferences
to false unless you meet a condition. That condition is to set <EnableDynamicLoading>true</EnableDynamicLoading>
.This same property also results in deps.json files being generated, so we should just simplify to that property.
It's pretty cool that with that property, there's no difference in targeting Full framework vs .NET MSBuild, from a packaging perspective. Really sweet stuff.
The package itself needs testing (which I'll do manually now that the package is valid), but we're almost ready to merge this.
Any plan to merge this PR? I am facing below issue on VisualStudio 2022, but use dotnet cli is working as expected. I think this PR may solve my issue.
ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: The "Ionide.KeepAChangelog.Tasks.ParseChangeLogs" task failed unexpectedly.
ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'FParsec, Version=1.1.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: File name: 'FParsec, Version=1.1.1.0, Culture=neutral, PublicKeyToken=null'
ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: at KeepAChangelog.Tasks.ParseChangelogs.Execute()
ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
This PR
I did this because
Current problems:
ResolveReferences
target doesn't run when I expect and so noBuildOutputInPackage
items are written for thenet6.0
TFM. This results in the following incorrect package layout: