--generate-load-scripts for .NET Core appears to create incorrect #r directives
See original GitHub issueDescription
--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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >System could not be found Visual Studio 2017 ASP.NET ...
So I went into Tools > Nuget Packet Manager and un-checked the wrong one. Hit "Ok", and then rebuilt the project, and it...
Read more >Stop using the HttpClient the wrong way in .NET - YouTube
NET could be completely wrong and then follow it up by showing you the right way to implement it. Workshops NDC Oslo |...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@smoothdeveloper Yes I think that should work
@filipw I’ve made a PR, could you check that comment: https://github.com/fsprojects/Paket/pull/2162#issuecomment-283190489 if that matches your expectation?