Comments (5)
This is great. I think we can support both for the time being for the sake of sanity - but would you be willing to open a PR or should I? 😄
from dotnet-script.
Sorry for the late reply. Currently in vacation mode and will be for another couple of weeks. If you want to get the ball moving before that you can take a look here. I have this CSX project that is basically nothing but a place where I experiment with scripting stuff :)
https://github.com/seesharper/csx/blob/master/src/RuntimeDependencyResolver.cs
from dotnet-script.
I've started to look into this a bit more and we can easily support both project.json and csproj simultaneously. The best approach would probably be to use csproj behind the scenes for project-less contexts. Then we would no longer rely on NuGet350 to resolve Nuget Packages. All we need for package resolving at the execution side (dotnet script) is the dotnet cli. Having it work with an "user defined" csproj file is a step further down the road as it would require changes in omnysharp-roslyn. I doing a spike now on how to get csproj support into dotnet script for project-less contexts. Omniharp-roslyn could also quite easily be updated to support csproj based scripts at least as long as we target netcoreapp where we can pull the dependency graph from the Microsoft.Extensions.DependencyModel.
from dotnet-script.
The goal is to have this script work on Windows and *nix platforms.
#r "nuget:Microsoft.Data.SQLite, 1.1.1"
using Microsoft.Data.Sqlite;
using (var connection = new SqliteConnection("Data Source=:memory:"))
{
connection.Open();
}
This involves loading native libraries as well as assembly redirecting.
If we can load and execute this script, we should be able to consume just about any package.
from dotnet-script.
Covered by the 0.13.0 release
from dotnet-script.
Related Issues (20)
- dotnet -h doesn't show script command HOT 1
- How to pass the NuGetInteractive option to dotnet script? HOT 1
- Reference to Microsoft.NET.Sdk.Web not work HOT 4
- Help with logging HOT 1
- Not getting environment from DOTNET_ENVIRONMENT variable HOT 1
- Is there support for equivalent of .csproj ImplicitUsings? Could it be added? HOT 3
- csx parsing problems HOT 5
- Cannot restore nuget packages if script location has %20 in path
- consider use ${userHome} instead while init HOT 6
- Shebang directive on top of the file breaks #r SDK parsing HOT 10
- 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
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.