-
Notifications
You must be signed in to change notification settings - Fork 790
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
Fixed non-script file creating a stand alone project #4307
Conversation
What happens now if you drag-and-drop an |
Also worth speaking to @KevinRansom as he added this logic for CPS - this case never used to be here |
@saul, we went over it this morning. |
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.
Nice ...
Thanks for this.
What's the answer to this? |
Changed my mind, I don't think this is the right fix.
@dsyme , @ saul to answer the copy/paste question: When a file is pasted into a project, the file is added to the project. When the user double clicks on the file, it will open, and be colourised and have intellisense. @TIHan, @Pilchie, @brettfo, @cartermp I have given this more thought today, and the original code enabled loose F# files that are not part of the current project or solution to be colourized and intellisensed. With this change they will be opened without colorization and without intellisense, which is a giant step backwards. There is an underlying problem in the Project System or CPS that is causing the file deletion to try to transfer ownership of a deleted file between projects. That seems a bit wierd right there, why transfer ownership ... just delete it and make sure all of it's containing projects know that seems like the way to go. Anyway, this change treats the symptom rather than the actual underlying issue, I think we need to delve a bit deeper to find that underlying issue. Kevin |
Thinking about it more as well, @KevinRansom is right. Will need to investigate more into this. |
That’s a shame - that’s what I thought. I spent some time looking at SetupNewTextView in #1944. The whole thing strikes me as wrong - as does the project setup code (the mailbox processor that runs after solution load). It just seems like the wrong way of setting up projects for individual files. For CPS at least, can’t we follow the Roslyn convention for standalone files? I know there’s the MiscellaneousFilesWorkspace, but I don’t think that’s used for |
Yes, |
Roslyn does this for linked files (any file in multiple projects with the same file path) because you could be unloading one project or the other, or other weird scenarios like that. Seems like there are two root problems.
|
Fixes dotnet/project-system#3195 (comment)
When creating a new project, the default file that gets added will create a stand alone project based on itself because the project hasn't been added to the solution yet in SetupNewTextView. We can safely ignore this.