microsoft / MSBuildLocator

An API to locate MSBuild assemblies from an installed Visual Studio location. Use this to ensure that calling the MSBuild API will use the same toolset that a build from Visual Studio or msbuild.exe would.
Other
216 stars 83 forks source link

MSBuildLocator is not available in .NET Core #144

Closed ehsan-keshavarzian closed 1 year ago

ehsan-keshavarzian commented 2 years ago

image

rainersigwald commented 2 years ago

~What version of the package are you using? How are you referencing it in your project?~

rainersigwald commented 2 years ago

This package is available for netcoreapp2.1 and higher and is not compatible with netcoreapp2.0. Can you retarget your application to a higher version?

Note that the .NET Core 2.0, 2.1, 2.2, and 3.0 runtimes are now out of support.

ehsan-keshavarzian commented 2 years ago

I actually started from .NET 5 and went down to >NET Core 2.0 and it was the same for all of them. It happens when I use PackageReference. I downloaded the assembly and referenced it from disk and it works fine (netcoreapp3.1).

Forgind commented 2 years ago

What version of MSBuildLocator are you using? How are you referencing it?

I have a project (targeting net6.0, but it also worked when targeting other frameworks) with , and it works fine.