Comments (7)
The Roslyn team have already shown interest in building this into the Roslyn scripting libraries. Whatever happens here should be in line with what happens there to avoid fragmentation. I.e. scripts that run with runner A but not runner B. For that reason I would raise this again with Roslyn before doing anything here. E.g. dotnet/roslyn#6900
from dotnet-script.
I am not entirely sure that project.json is the best way to specify dependencies since Microsoft is moving away from it.
something it's going to stay there for Nuget (whether it's nuget.json
or whatever it's called, we'll see 😄
Regarding the other stuff, I tend to agree with Adam, yes.
That said, I still see some room for runner customization out there, especially as we work toward solving very specific problems. For example writing ASP.NET apps contains a lot of extra ceremony so I could imagine dotnet script aspnet foo.csx
which would wire in a custom host that exposes ConfigureServices
and such methods (see here). It has to be an opt in though (part of the Roslyn's scripting big selling points is Bring Your Own Globals, after all).
from dotnet-script.
The bring your own globals is indeed very powerful and I believe it's best used when hosting scripts in apps, where the scripts are specifically written for use in those apps. E.g. similarly to how VBA used to be used for app automation back in the day (and as the back bone of many large companies today 😰), where each app injects its context specific objects in, such as an Excel workbook, or Word document.
One temptation is to put boiler plate into globals but once we get better nuget support for scripting, it will be much easier to pull in those things via a nuget package. Of course, that won't work when the runner itself has to inject some context. For that case, perhaps there is an argument for some infra-level specific globals, e.g. an "ASP.NET flavour script" such as the one you linked to. For a generic runner, I'd like to see as much portability as possible.
from dotnet-script.
I was just wondering how you guys plan to move this forward. project.json is practically a goner starting with the preview 3 SDK. Roslyn Scripting is approaching 2.0, but I don't know if they have put in support for NuGet packages in load directives yet?
from dotnet-script.
IMHO the first thing to do is to check on the status of this within Roslyn scripting.
from dotnet-script.
Roslyn Scripting is approaching 2.0, but I don't know if they have put in support for NuGet packages in load directives yet?
no
I was just wondering how you guys plan to move this forward. project.json is practically a goner starting with the preview 3 SDK
the scripting here will change up to use csproj instead
from dotnet-script.
Fixed by #84
from dotnet-script.
Related Issues (20)
- Execution Speed HOT 12
- Getting "missing reference errors" in Visual Code and dotnet script. HOT 1
- support relative dll-file-path reference HOT 3
- Change target framework from `net7.0` to `net472` HOT 2
- Feature Request: Set exit code for script not found
- "User-Unhandled Exceptions" don't work in debugger
- System.IO.FileLoadException: Could not load file or assembly HOT 2
- syntax highlighting + intellisense not working for project created using `dotnet script init` HOT 4
- dotnet script Could not execute because the specified command or file was not found HOT 2
- Will .net 8 be supported as soon as it comes out? Will there be any further performance improvements? HOT 1
- Error on running script in docker container
- how to execute linux command HOT 1
- Install dotnet-script fail HOT 2
- When I use ScriptCompiler compile and run, memory usage not released HOT 3
- Inconsistent argument passing in `Environment.GetCommandLineArgs()` and `Args`
- add F# support, to benefit from framework reference
- Add preprocessor directives support
- Cache from different scripts refers to the same folder HOT 1
- init command - consider highlighting when .vscode/launch.json file overwritten and not updated HOT 2
- VSCode: dotnet-script installed in the global path creates a launch.json with absolute path to the .dll HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-script.