Scripting story, how to reference assemblies in script files
See original GitHub issueI use .fsx and .csx files to do scripting, nowadays I’m relying on paket to list and download my dependencies (transitive dependencies included), which has a side effect of those assemblies to land under packages/packagename/../
folder which I can then easily reference:
#r @"../../packages/packagename/lib/netcore/packagename.dll"
// I can now easily use the package
What is the story with dotnet cli for this?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Referencing Other Assemblies in Scripting Solutions
To add the reference, in VSTA, in the Add Reference dialog box, on the Browse tab, locate and add the managed assembly. For...
Read more >Unity Features 101: Assembly Definitions
Right Click in your new folder then Create > Assembly Definition Reference. Click on this new reference, and drag your TestAssembly into the ......
Read more >Unity Cannot See the Scripts in Assembly-CSharp.dll ...
In this case, if you want to reference the Oculus files, you either need to create another assembly definition containing those files (and...
Read more >Fixing the missing assembly reference error in Unity projects
The scripts were imported alright so what caused the issue? ... Selecting assembly reference files. Then at the end, ... Tell your story....
Read more >Support inline references for script packages · Issue #156
I imagine we'd want to do the equivalent for a NuGet package containing both assemblies and C# scripts in content/csx/{TFM}, i.e. add references...
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 Free
Top 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
Scripting has always been one of the most important features in F# land and the rise of things like ScriptCs shows that it’s also important in C#. TBH I can’t really understand how fsx/csx files are not supported from day 1. We asked for this on every occasion.
@smoothdeveloper regarding dependencies. It looks like NuGet will never get the concept of solution-wide dependencies. But fortunately the new MSBuild-based project format allows Paket to hook in again and we have https://twitter.com/sforkmann/status/790856841106493441 - so that’s good.
I think paket’s “load scripts” will be the way to go for including deps in fsx. But it’s a long way.
This is something that is/should be worked out by the teams who own these scripting experiences, which is not the CLI. Closing this issue.