Loading .NET C# or VB projects using database blob objects as sources

Hi,

Is it possible to load a .NET project without using any files yet able to edit, debug WinForms apps (multiple source “files”) in C# and VB?

Our main application uses RDBMS to store data and objects. We have a requirement that no filesystem files are used (to avoid access issues when deployed in highly secured environment).

Looking through the demo solutions, I have not been able to piece together how this can be achieved. It will be greatly appreciated if a sample solution can be provided.

Thank you.

You can have project loaded from XML which can be stored in the database, and load content of the files from this project to be displayed in the editor without physical file on the disk as well.

Furthermore, you can provide a content of these files to the ScriptRun by handling FileLoad event during compilation and generate in-memory assembly, this would allow executing code without any files on the disk. We can provide a demo how to do that should it be required.

However for debugger to work you would need executable, pdb file and any non GAC assemblies to be presented on the disk, so it can be run as a windows process which debugger can be attached to. These files can be generated in the temporary folder, but I can’t see how it can work without any files at all.

Thanks Andrew for your reply. We will look into possibly separating the debugging for only users with elevated permissions so that temporary files can be used.

A demo for running without files will be much appreciated.

I’ve uploaded sample demo with modified dlls:
https://drive.google.com/file/d/1C2buF8GMvu5HntRlw2bqjHOimA9gT60m/view?usp=sharing
Please try it and let me know whether it useful for you.

Thanks very much Andrew. We can definitely use this as a reference. Cheers.