Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate running on full desktop CLR #44

Open
filipw opened this issue Dec 15, 2016 · 5 comments
Open

Investigate running on full desktop CLR #44

filipw opened this issue Dec 15, 2016 · 5 comments

Comments

@filipw
Copy link
Member

filipw commented Dec 15, 2016

Mono/. NET 4.6

@acormier
Copy link

I tried loading the Dotnet.Script.Core lib from a .Net Framework app instead of using Dotnet.Script CLI app.

In ScriptCompiler.cs there's the line: var inheritedAssemblyNames = DependencyContext.Default.GetRuntimeAssemblyNames(runtimeId) but DependencyContext.Default returns null. It seems that that code is to compensate for the lack of AppDomains in .netcore but since the Dotnet.Script.Core assembly targets .Net Standard 2.0 I thought it would just work. What am I missing? Thanks

@acormier
Copy link

I just now saw the discussion about DependencyContext.Default returning null here: #224

@filipw
Copy link
Member Author

filipw commented Apr 26, 2018

I think you are on some really old version, because that code doesn't exist for quite a while now.
That said, the current version of Dotnet.Script.Core would not work on desktop framework for at least two reasons:

  1. there is code which tries to determine a current runtime identifier and if it's not netcoreapXXX it fails
  2. the default references (such as System.dll, System.Core.dll and so on) are not implicitly added. That is because we pick them up from project.assets.json. This works fine on .NET Core, but on Desktop .NET the GAC references would be skipped and would have to be added manually

I am not sure if these are all the roadblocks, but these are definitely there from the top of my head.
There is no reason why these couldn't be fixed though, in fact this should be fairly uncomplicated to do so if this is something you feel like you'd need, then we could fix that.

@acormier
Copy link

I had 0.21.0 checked out which is 10 days old. I guess that is really old :-)

Our app hosts the .net framework and supporting C# scripting with dotnet-script is what I'm trying to do. I can imagine that others would benefit from using Dotnet.Script.Core from Desktop apps

@filipw
Copy link
Member Author

filipw commented Apr 27, 2018

I guess that is really old :-)

😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants