fsprojects / fsprojects/Paket

--generate-load-scripts for .NET Core appears to create incorrect #r directives

Open
#2,156 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug generate scripts
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

--generate-load-scripts for .NET Core appears to create incorrect #r directives as it's including GAC references.

Repro steps

paket.dependencies

source https://nuget.org/api/v2
nuget Newtonsoft.Json

Run:

.paket\paket.exe install --generate-load-scripts load-script-framework netstandard1.6
Expected behavior

The produced CSX file contains only references to physical DLLs from packages folder.

Actual behavior

The produced CSX file contains GAC references too.

#r "System.Xml.Linq" 
#r "System.Xml" 
#r "mscorlib" 
#r "System.Core" 
#r "System" 
#r "System.Runtime.Serialization" 
#r "System.ComponentModel.Composition" 
#r "Microsoft.CSharp" 
#r "../../../packages/Microsoft.CSharp/lib/netstandard1.3/Microsoft.CSharp.dll" 
#r "../../../packages/Newtonsoft.Json/lib/netstandard1.0/Newtonsoft.Json.dll" 
#r "../../../packages/System.Dynamic.Runtime/lib/netstandard1.3/System.Dynamic.Runtime.dll" 
#r "../../../packages/System.IO.FileSystem.Primitives/lib/netstandard1.3/System.IO.FileSystem.Primitives.dll" 
#r "../../../packages/System.Linq/lib/netstandard1.6/System.Linq.dll" 
#r "../../../packages/System.Linq.Expressions/lib/netstandard1.6/System.Linq.Expressions.dll" 
#r "../../../packages/System.ObjectModel/lib/netstandard1.3/System.ObjectModel.dll" 
#r "../../../packages/System.Reflection.Emit/lib/netstandard1.3/System.Reflection.Emit.dll" 
#r "../../../packages/System.Reflection.Emit.ILGeneration/lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll" 
#r "../../../packages/System.Reflection.Emit.Lightweight/lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll" 
#r "../../../packages/System.Reflection.TypeExtensions/lib/netstandard1.5/System.Reflection.TypeExtensions.dll" 
#r "../../../packages/System.Runtime.Handles/ref/netstandard1.3/System.Runtime.Handles.dll" 
#r "../../../packages/System.Runtime.Serialization.Primitives/lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll" 
#r "../../../packages/System.Text.RegularExpressions/lib/netstandard1.6/System.Text.RegularExpressions.dll" 
#r "../../../packages/System.Threading/lib/netstandard1.3/System.Threading.dll" 
#r "../../../packages/System.Threading.Tasks.Extensions/lib/netstandard1.0/System.Threading.Tasks.Extensions.dll" 
#r "../../../packages/System.Xml.ReaderWriter/lib/netstandard1.3/System.Xml.ReaderWriter.dll" 
#r "../../../packages/System.Xml.XDocument/lib/netstandard1.3/System.Xml.XDocument.dll" 
#r "../../../packages/System.IO.FileSystem/ref/netstandard1.3/System.IO.FileSystem.dll" 
Known workarounds

When processing the file, it's possible to manually strip away the offending references.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown paket.dependencies file and the --generate-load-scripts load-script-framework netstandard1.6 command. Trace the implementation of load-script generation and compare the produced CSX references with the expected physical DLL references; done means GAC references are absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.