-
Notifications
You must be signed in to change notification settings - Fork 392
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
Consider to have an option to disable loading additional TFM in a super large solution #3323
Comments
Yep, this requires a little design to figure out. |
I'll make this the temporary opt-out. We need a long term design for the real fix which might be to dynamically load/unload configs based on usage. |
This would help us a lot I think. It would be great to have a way to select what 'main TFM' should be, and to adjust that based on editing needs. It would be acceptable for us to require a restart of VS for the changes to become effective. |
@steffenloesch The main TFM will be the first, that's how we use it for all others that don't understand "multi-targeting". |
So when a developer wants to switch the main TFM to get a better IDE experience for that TFM, she'd have to reorder the TFM list, right? We can probably work with that. |
I think I have a design for this and turns out to be pretty easy:
|
This design is harder than we think; we still an evaluation & design-time build to make NuGet restore happy, so we can't just turn off the configuration. |
@steffenloesch: Note for 15.7 Preview 5 - we've made a change that prevent us from loading an additional config for projects if |
Unfortunately, moving the remainder to 15.8. |
Thanks for the updates! @davkean can you be more specific about what we need to do to avoid unnecessary loading? Does this change only work if the TargetFrameworks are explicitly defined in the csproj itself, or do you also support defining it in Directory.Build.props, say? Your last post can be read as "TargetFrameworks needs to be set to empty", which doesn't make sense to me. Do Platform and Configuration also have to be explicit in the csproj itself for getting efficient loading? |
The optimization applies if TargetFrameworks appears within the project itself, it shouldn't be empty. We've yet to come up with a design for looking in Directory.Build.props. |
Follow-up question for @davkean: Is it sufficient for this optimization that first target framework is defined explicitly in the csproj, but others are not? In other words: if my project file contains |
Yes, we will handle that correctly. |
@davkean PR #3482 mentions "Configuration and Platform are only read if the solution didn't provide a default". What entries need to be present in the sln file to provide a default? Is it entries in GlobalSection(ProjectConfigurationPlatforms) like this? |
When many projects in the solution have multiple TFMs, the current way to load all of them into memory and runs design time builds and builds language model is not scale well. Instead of running out of memory or make the IDE very slow, may suppressing some design time support, but fully support TFMs during build can be an option.
The text was updated successfully, but these errors were encountered: