Skip to content

Added solution filter for .NET projects #3906

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

Merged
1 commit merged into from
Apr 21, 2021

Conversation

Sergio0694
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Infrastructure

What is the current behavior?

There is no solution filter or solution available to only work on .NET-based projects. This has two issues:

  • It is extremely cumbersome for developers on either other platforms (eg. Linux, iOS) or on Windows but without the necessary UWP SDKs installed to open the solution and contribute, as they'd have lots of projects failing to open, VS showing all sorts of warnings and error windows, etc.
  • Even for developers with all needed SDKs, opening the entire solution every time even when just working on a .NET component takes longer to load, makes VS slower due to the higher number of loaded projects, makes build times longer, etc.

What is the new behavior?

There is now a solution filter with just the .NET projects, which makes it super easy to only load up those projects to contribute to the Toolkit. The solution filter is much faster to load and makes it generally a better experience to work in this scenario 😄

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

@Sergio0694 Sergio0694 added visual studio 🔀 maintenance ⚙️ .NET Components which are .NET based (non UWP specific) labels Mar 31, 2021
@ghost
Copy link

ghost commented Mar 31, 2021

Thanks Sergio0694 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker, azchohfi, Kyaa-dost and Rosuavio March 31, 2021 11:54
@Rosuavio
Copy link
Contributor

@Sergio0694 I like this, but on linux and mac dont users only have access to vscode. I am not too familiar with the c# workflow from vscode, but I would like to know steps a user has to take to take advantage of this and what it looks like for them.

@Sergio0694
Copy link
Member Author

Sergio0694 commented Mar 31, 2021

@RosarioPulella I think that on other platforms there are still ways to leverage solution files, eg. I believe JetBrains Rider is capable of opening solution files, so users of that IDE would be able to use the solution filter. As for users with VS Code, I think those could just manually open the folder (not the solution), and then they'd able to compile the individual projects directly, though we could investigate VS Code support more in the future as well, sure 👍

For this PR specifically, my idea is that having a solution filter right now would at the very least make life much easier for existing VS users that are only interested in contributing to .NET projects (eg. I've been using this solution filter while working on #3873 because opening the entire solution every time was taking too long, and this has made my workflow much better), and it'd at the same time have the welcome "side effect" of also making things simpler for users on IDEs supporting solutions as well (like Rider, as mentioned before). But I didn't mean this PR on its own to make the Toolkit as a whole necessarily "cross platform friendly" 🙂

Thoughts?

@Rosuavio
Copy link
Contributor

Thanks @Sergio0694, I think that shows the usefulness of this change. I was hoping there was some utility for VSCode users, but I see how this can help a subset of our contributors.

I think if we really want to better support contributors from platforms other than windows we should look into improving a workflow using VSCode. Like maybe adding a launch.json file or a workspace file. That can come in another PR.

@ghost
Copy link

ghost commented Mar 31, 2021

Hello @RosarioPulella!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 4 hours 5 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@Sergio0694 Sergio0694 force-pushed the feature/net-solution-filter branch from c3cdc38 to 8d8107f Compare March 31, 2021 15:57
@Sergio0694 Sergio0694 force-pushed the feature/net-solution-filter branch from 8d8107f to 4ee1c0e Compare April 9, 2021 16:49
@Sergio0694 Sergio0694 force-pushed the feature/net-solution-filter branch 3 times, most recently from b6a052d to 1c8fd28 Compare April 16, 2021 12:57
@michael-hawker
Copy link
Member

@Sergio0694 assume the Unit Tests can also be run without issue from the VS IDE?

I like the idea of providing a .vscode folder too which can run the Unit Tests and build the C# projects from VS Code, but we should probably open a separate issue for that and do outside of this PR.

As part of 7.1, we need to figure out how we manage the project from a repo/git perspective, so that'll be the big technical challenge we face next... 🙂

@Sergio0694
Copy link
Member Author

"assume the Unit Tests can also be run without issue from the VS IDE?"

@michael-hawker Yup, you just get this smaller solution which loads super fast and only needs the .NET SDKs:

image

All those .NET unit test projects build and run just fine, so you can fully test code from those projects from here 🙂

"I like the idea of providing a .vscode folder too which can run the Unit Tests and build the C# projects from VS Code, but we should probably open a separate issue for that and do outside of this PR."

Yup, agreed that that could be helpful for devs on other platforms other than Windows wanting to contribute to the .NET projects in the WCT, absolutely! We could definitely open another PR to add a .vscode folder/workspace too! 😄

@Sergio0694 Sergio0694 force-pushed the feature/net-solution-filter branch from 1c8fd28 to 509877e Compare April 21, 2021 10:42
@ghost ghost merged commit 385e4fb into CommunityToolkit:master Apr 21, 2021
@Sergio0694 Sergio0694 deleted the feature/net-solution-filter branch April 21, 2021 11:46
@michael-hawker michael-hawker added this to the 7.0.2 milestone May 11, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merge ⚡ maintenance ⚙️ .NET Components which are .NET based (non UWP specific) visual studio 🔀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants