-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add Simple C# Programs #296
base: main
Are you sure you want to change the base?
Conversation
|
||
## Simple C# is just C# code | ||
|
||
Simple C# Programs are not a dialect of the C# language, like the interactive dialect, CSX. Any code in a Simple C# Program can be built and run in a project-based program. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you say that Simple C# programs will not a dialect of the C# language, but then you propose that the #r "nuget:PackageId"
syntax be copied from .NET Interactive.
Therefore, are you proposing that directories with a csproj allow individual .cs
files to also use #r
to reference packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, wondering if it's possible to treat the #r
syntax as a comment when building with a project file?
We should be able to tell if the build is built with a project/solution file, right?
If yes, think then we could make it different when in different modes
I'm interested. Please ping me in the future if you need testers or any kind of help. |
These are my 2 cents on this:
{
"frameworks": [
"Microsoft.WindowsDesktop.App",
"Microsoft.NETCore.App",
]
} Notes:
With all of this I think it would be a good compromise for easier ways of running .NET Program code in a way that is similar in nature to python, JavaScript, etc. Overall I think the document can be summarized down to basically what I wrote above which I feel is much better and also easier to understand and break into parts for people to handle. |
I just thought of this as well but an alternative to using the
|
After thinking about this more, the processing of this for And due to |
Hoping for
I think this could be considered as an option, like enable default items or not in the MS Build And I'm trying on the Currently, I'm trying to compile the code with Roslyn in runtime and execute the compiled dll with reflection and assembly loader |
Continues of #213
since the original PR closed, migrated from https://github.com/cartermp/designs/blob/a27fd42a68370f315bc2293dc748145f4075697f/proposed/simple-csharp-programs.md
rendered-view: https://github.com/WeihanLi/dotnet-designs/blob/simple-csharp/proposed/simple-csharp-programs.md