Giter Site home page Giter Site logo

Move to csproj? about dotnet-script HOT 5 CLOSED

dotnet-script avatar dotnet-script commented on June 19, 2024
Move to csproj?

from dotnet-script.

Comments (5)

filipw avatar filipw commented on June 19, 2024

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.

seesharper avatar seesharper commented on June 19, 2024

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.

seesharper avatar seesharper commented on June 19, 2024

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.

seesharper avatar seesharper commented on June 19, 2024

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.

seesharper avatar seesharper commented on June 19, 2024

Covered by the 0.13.0 release

from dotnet-script.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.