Skip to content

Use a common target framework from all of your projects #253

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
merged 4 commits into from
Aug 15, 2025

Conversation

AdeAttwood
Copy link
Contributor

Summary:

When using multiple target frameworks in multiple projects. We are currently resolving the latest target framework that exists over all of your projects. The issue with this is the selected target framework may not work with some of the projects.

This resolves the latest target framework that exists in all of your projects. This will give the best framework compatibility.

Test Plan:

Unit test for the existing select latest framework is still there. I have also tested this locally over a project that uses net8.0 and net10.0 in some projects.

Screenshot 2025-08-13 095612

Ref: #75

AdeAttwood and others added 2 commits August 13, 2025 10:10
Summary:

When using multiple target frameworks in multiple projects. We are currently
resolving the latest target framework that exists over all of your projects. The
issue with this is the selected target framework may not work with some of the
projects.

This resolves the latest target framework that exists in all of your projects.
This will give the best framework compatibility.

Test Plan:

Unit test for the existing select latest framework is still there. I have also
tested this locally over a project that uses `net8.0` and `net10.0` in some
projects.

Ref: razzmatazz#75
@razzmatazz
Copy link
Owner

razzmatazz commented Aug 14, 2025

Hey @AdeAttwood, thank you!

I have updated your PR to actually test the applyWorkspaceTargetFrameworkProp function so your changes to the behaviour for tfm selection are actually tested.

Could you take a look at the updated TestCase's in IntenralTests.fs to validate that your particular case is being tested?

@razzmatazz
Copy link
Owner

Also, could you add a CHANGELOG.md entry too? I can do this for you but you may be able to word it better.

@AdeAttwood
Copy link
Contributor Author

@razzmatazz I think that's all done now, thanks for the point in the right direction. There was an issue with Set.intersect when there was only one project. I have moved over to Set.intersectMany that does not have the same issue. It also returns a district set so the call to Seq.distinct has been removed.

Let me know if there is anything else that needs doing.

@razzmatazz
Copy link
Owner

Looks good to me, lets get this in!

@razzmatazz razzmatazz merged commit 667fcd4 into razzmatazz:main Aug 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants