-
Notifications
You must be signed in to change notification settings - Fork 240
Std lib replacement support like in Script# #5
Comments
This should already work if you compile your app against their replacement libraries, but I haven't ever used Script#. Am I missing specific features you need in order to do this? It sounds like you want modified behavior in Visual Studio, and JSIL currently has no interaction with VS. |
Sorry for my previous deleted entry. Used the wrong tab. In every C# project you can disable the automatic referencing of mscorelib via Build->Advanced->"Do not reference mscorelib.dll". If you do that you get a lot errors, since the C# compiler needs some basic classes like object, string, int32 to work. No you could provide your own JSILCoreLib which provides a basic impl/proxying for that. If you do that you make sure that VS could only provide intellisens for classes which are existing not for something like AppDomain which can not exist in JS. |
Is there a specific feature JSIL has implement for this issue? I guess what is needed is to replace/extend JSIL.Bootstrap.js & proxies with a C# assembly that would replace mscorlib? |
I've started hacking on a mscorlib replacement. It does not work yet, but if anyone is interested it can be found at https://github.com/markusjohnsson/JSIL/tree/jsil_corlib |
Meta needs to be a separate assembly because it contains attributes used by JSIL itself. It's possible to have those attributes be within the proxy library, I suppose, but that makes it a heavier dependency and means that JSIL can never actually reference the attribute types directly. Making it heavier is also bad since any native .NET app that uses the attributes would still have to ship that library in its native form. |
In Script# it is possible to replace a std lib with the one from Script#. With that it is only possible to access function in c# which are supported in Script# and also the intellisens only show classes and function which are supported not the whole thing which the clr offers.
The text was updated successfully, but these errors were encountered: