You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The proposed workaround is to compile the c# file into a dll and then #r that.
This works fine - the first time.
But the workbook locks the DLL!
If I need to change something, I need to close VS code, recompile the dll, then restart the workbook.
This sucks.
Please note that I don't specifically need to use namespaces in a C# script. The linked issue describes why that was not implemented. Instead I'd like to import normal C# (not script) files into a script. It's fine if the script executor compiles the .cs file(s) into a separate assembly and then loads that, as long as it does it transparently in the background.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
ref dotnet/roslyn#4478
Not being able to reference a normal C# file (.cs) from a script really hampers the productivity of using .NET Interactive workbooks.
I have a CSV file with data, and a Models.cs file which contains - you guessed it - the schema for the data.
What I'd like to do is
Open VS Code, create a new Workbook.
The proposed workaround is to compile the c# file into a dll and then
#r
that.This works fine - the first time.
But the workbook locks the DLL!
If I need to change something, I need to close VS code, recompile the dll, then restart the workbook.
This sucks.
Please note that I don't specifically need to use namespaces in a C# script. The linked issue describes why that was not implemented. Instead I'd like to import normal C# (not script) files into a script. It's fine if the script executor compiles the .cs file(s) into a separate assembly and then loads that, as long as it does it transparently in the background.
Beta Was this translation helpful? Give feedback.
All reactions