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

Add spec for dotnet run file.cs #47020

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

jjonescz
Copy link
Member

@jjonescz jjonescz commented Feb 21, 2025

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Feb 21, 2025
@jjonescz jjonescz marked this pull request as ready for review February 21, 2025 15:57
@Copilot Copilot bot review requested due to automatic review settings February 21, 2025 15:57
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nkolev92 nkolev92 requested a review from a team February 27, 2025 18:38
@Nigusu-Allehu Nigusu-Allehu self-requested a review February 27, 2025 18:40
@baronfel baronfel added Area-run-file Items related to the "dotnet run <file>" effort and removed untriaged Request triage from a team member Area-CLI labels Feb 27, 2025
@RikkiGibson
Copy link
Contributor

RikkiGibson commented Feb 27, 2025

So, suppose /myapps/ is open in the IDE. When we are viewing /myapps/utils.cs, we will have to go through every /myapps/app1.cs, /myapps/app2.cs and so on, and add it as a target in the drop-down list on the top left, right? And the contents of each app.cs are visible to utils.cs in the context of that app-specific build, but, it won't be practical to refer to types etc. declared in one of the app files from within utils.cs, because they'd kinda have to be copy-pasted within each app file anyway.

All of that seems fine to me. Just putting together the larger picture in my mind.

Also, will it be possible to make app.cs an entry in a solution file just like a project would be?

@jjonescz
Copy link
Member Author

jjonescz commented Feb 28, 2025

add it as a target in the drop-down list on the top left, right?

You mean like launch target? I guess yes, same as if app1 and app2 were regular projects.

And the contents of each app.cs are visible to utils.cs in the context of that app-specific build

No, the app1 and app2 projects will reference utils but that's it, i.e., apps can see utils but not the other way around. Imagine the project structure after "grow up" (see "Multiple entrypoints" section) - the behavior before "grow up" is equivalent. I will clarify.

Also, will it be possible to make app.cs an entry in a solution file just like a project would be?

I think you can add arbitrary files as "Solution Files" even today. You would have to add all your project-less .cs files though, adding just the entry file and having IDE discover the rest is a possible future feature I suppose.

@RikkiGibson
Copy link
Contributor

You mean like launch target? I guess yes, same as if app1 and app2 were regular projects.

I was thinking of this one:

image

I guess it is called the "projects" list, though, it is really populated with each TFM for each project.

It sounds like actually utils.cs is supposed to have its own non-executable virtual project. So that list would only have the one item in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-run-file Items related to the "dotnet run <file>" effort documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants