Skip to content

Replacing VSWhere with MSBuild.Locator#75

Merged
gasparnagy merged 1 commit intoreqnroll:mainfrom
Tiberriver256:main
Mar 11, 2024
Merged

Replacing VSWhere with MSBuild.Locator#75
gasparnagy merged 1 commit intoreqnroll:mainfrom
Tiberriver256:main

Conversation

@Tiberriver256
Copy link
Contributor

This should expand MSBuild discovery to include dotnet SDK installations allowing developers to use other tooling besides Visual Studio (i.e., JetBrains/VSCode/etc.)

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Performance improvement
  • Refactoring (so no functional change)
  • Other (docs, build config, etc)

This should expand MSBuild discovery to include dotnet SDK installations
allowing developers to use other tooling besides Visual Studio (i.e., JetBrains/VSCode/etc.)
@Tiberriver256
Copy link
Contributor Author

@ajeckmans / @gasparnagy

I had a chance to make a PR based on what was discussed in #74.

  • We're still using msbuild.exe
  • We've replaced VSWhere with MSBuild.Locator to expand the MSBuild search to include dotnet SDK installations as a potential location

All the CI tests pass, but at the moment, I believe the CI tests only run a small portion of the tests, so there's a potential for breakage here.

I am also not a JetBrains user, so if you could try it out for us, @ajeckmans, and see if it works better for you locally, that would be awesome.

@gasparnagy
Copy link
Contributor

Thank you @Tiberriver256! This looks good. If @ajeckmans sends an OK signal, we should squash & merge this.

Technical side note: In general, I suggest that the ones who are already in the contributors or the core team groups to do the PRs from branches of this repo directly (without forking), because that way it is easier for others (like in this case @ajeckmans) to try it out or even making small fixes.

@Tiberriver256
Copy link
Contributor Author

Sounds good @gasparnagy. I'll plan on using branches moving forward. Let me know if you want me to close this PR and reopen a new one from a branch.

@gasparnagy
Copy link
Contributor

@Tiberriver256 not at all. Was just a comment for the future.

@ajeckmans
Copy link
Contributor

ajeckmans commented Mar 11, 2024

I'll not be able to check this today. It will have to wait till tomorrow.
I'm also fine with just merging this. If it works for the CI and building in Visual Studio at least it won't make things worse :)

looking at the documentation this will either fix the issue immediately in a Rider only environment because of point 2 of this search order list: https://github.com/microsoft/MSBuildLocator?tab=readme-ov-file#how-locator-searches-for-net-sdk Or it will at least give a way to make it work using any of the other search locations :)

@gasparnagy gasparnagy merged commit 638eb47 into reqnroll:main Mar 11, 2024
gasparnagy added a commit that referenced this pull request Mar 26, 2024
gasparnagy added a commit that referenced this pull request Mar 27, 2024
* system tests concept

# Conflicts:
#	Reqnroll.sln

* Update test for problem identified for #54 by @livioc

* replace BoDi with Reqnroll.BoDi

* portability test POC

* Undo 'Microsoft.Build.Locator' for MsBuild location and make it flexible with env vars (#75)

* add portability compilation tests with msbuild

* Add system tests to CI

* Fix system tests to CI

* Add TODOs for further portability tests

* Fix system tests to CI, take 2

* Change SystemTests to use MsTest

* set default target framework to .NET 8.0

* Add .NET Information to CI

* test specs filter on CI

* Revert "test specs filter on CI"

This reverts commit bdcdbaa.

* fix specs_filter on CI

* speed up build by using heuristics to find MsBuild

* speed up build by using global nuget packages folder

* cleanup CI script

* add CI system test for linux

* create Generation test structure

* add more categories and exclude .NET Framework and MsBuild tests from linux

* Add NUnit and xUnit tests

* rename AppConfigDriver to ConfigurationDriver, allow customizing nuget global folder

* fix strange test error if .NET 4.6.2 test target was not included in run

* Add smoke test

* TEST: remove test filter from Linux CI

* Add Generation test TODO comments

* re-add filter to linux CI

* enable parallel system testing

* set target fw of Reqnroll.TestProjectGenerator to netstandard2.0

* re-enable all specs tests

* code cleanup
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.

4 participants