Skip to content

Conversation

@jonathanpeppers
Copy link
Member

When looking at my Mono 5.12 installation, I noticed a few files we
should be using with xabuild.exe:

  • /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/NuGet.targets
  • /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks directory

NuGet.targets is needed for XABuildPaths.NuGetRestoreTargets, and
the Sdks directory can be used for MSBuildSdksPath.

Both of these values can still fall back to .NET Core, if they are not
found.

After these changes, it more closely matches the Windows code. We
should be able to build a wider range of .NET standard projects with
xabuild.exe now on macOS.

When looking at my Mono 5.12 installation, I noticed a few files we
should be using with `xabuild.exe`:
- `/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/NuGet.targets`
- `/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks` directory

`NuGet.targets` is needed for `XABuildPaths.NuGetRestoreTargets`, and
the `Sdks` directory can be used for `MSBuildSdksPath`.

Both of these values can still fall back to .NET Core, if they are not
found.

After these changes, it more closely matches the Windows code. We
should be able to build a wider range of .NET standard projects with
`xabuild.exe` now.
@jonathanpeppers jonathanpeppers requested a review from jonpryor May 16, 2018 01:54
if (!string.IsNullOrEmpty (DotNetSdkPath)) {
NuGetRestoreTargets = Path.Combine (MSBuildBin, "NuGet.targets");
if (!File.Exists (NuGetRestoreTargets) && !string.IsNullOrEmpty (DotNetSdkPath)) {
NuGetRestoreTargets = Path.Combine (DotNetSdkPath, "..", "NuGet.targets");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we verify that this path also exists? Or would that not matter?

@jonpryor jonpryor merged commit 50bda06 into dotnet:master May 16, 2018
@jonathanpeppers jonathanpeppers deleted the xabuild.exe-macos branch May 16, 2018 13:16
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants