Skip to content

[xabuild] support <PackageReference /> #1083

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 1 commit into from
Dec 14, 2017

Conversation

jonathanpeppers
Copy link
Member

The NetStandardReferenceTest has been failing on Windows due to its
use of <PackageReference />.

Windows appears to need to import two files:

  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.props
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets

Luckily we can set two properties to specify these paths:
$(NuGetProps) and $(NuGetTargets). I think this is only a problem on
Windows, as these files aren't present on macOS.

The `NetStandardReferenceTest` has been failing on Windows due to its
use of `<PackageReference />`.

Windows appears to need to import two files:
- C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.props
- C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets

Luckily we can set two properties to specify these paths:
`$(NuGetProps)` and `$(NuGetTargets)`. I think this is only a problem on
Windows, as these files aren't present on macOS.
@jonathanpeppers jonathanpeppers added the do-not-merge PR should not be merged. label Dec 7, 2017
@jonathanpeppers
Copy link
Member Author

Whoops I just found these on Mac:

/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild/Microsoft/NuGet/Microsoft.NuGet.targets
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild/Microsoft.NuGet.targets
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild/NuGet.targets

I think I need to test this on Mac, forcing the tests to run under MSBuild.

@dellis1972
Copy link
Contributor

dellis1972 commented Dec 7, 2017 via email

@jonathanpeppers jonathanpeppers removed the do-not-merge PR should not be merged. label Dec 7, 2017
@jonathanpeppers
Copy link
Member Author

Yeah, it worked when I tried it locally. I don't know why we have to include all these crazy properties just for Windows...

@borgdylan
Copy link

@dellis1972 Is PackageReference support for XA projects on Linux? (given the latest mono and the xplat-master build of MSBuild are both installed)

@jonathanpeppers
Copy link
Member Author

@borgdylan this PR is specifically around xabuild, which is a tool that lets you build projects with a copy of Xamarin.Android without installing it.

I think <PackageReference /> in a Xamarin.Android project would require us supporting the new project system. I know that is on our radar, but I don't know when it will happen.

@borgdylan
Copy link

Thanks for the insight. Support for the new project system would be a massive help for devs who use VSCode only or are on Linux.

@dotnet dotnet deleted a comment from dnfclas Dec 12, 2017
@jonathanpeppers
Copy link
Member Author

build

@jonpryor jonpryor merged commit d2b3b13 into dotnet:master Dec 14, 2017
@jonathanpeppers jonathanpeppers deleted the xabuild-packagereference branch December 14, 2017 14:00
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Apr 18, 2020
Changes: https://github.com/xamarin/monodroid/compare/846697287fb32c38b54ddd2fe21964b9159b2750...16cb1cb1ac7c472207023953b7bb3970f7c9aa54

  * xamarin/monodroid@16cb1cb1a: Bump to xamarin/androidtools/master@068e4f5 (dotnet#1084)
  * xamarin/monodroid@8f61f0cae: Bump to xamarin/android-sdk-installer/master@d9276b4 (dotnet#1085)
  * xamarin/monodroid@bec720cd0: Bump to xamarin/jar2xml@4125da65 (dotnet#1083)
  * xamarin/monodroid@a49e901d6: [tools/msbuild] update <BuildApk/> task inputs (dotnet#1082)
  * xamarin/monodroid@b9f16c002: Bump to xamarin/androidtools/master@5412dc8 (dotnet#1081)
  * xamarin/monodroid@673a74961: [.NET 5] fix for ALC isolation between assemblies (dotnet#1080)
jonpryor added a commit that referenced this pull request Apr 19, 2020
Changes: https://github.com/xamarin/monodroid/compare/846697287fb32c38b54ddd2fe21964b9159b2750...16cb1cb1ac7c472207023953b7bb3970f7c9aa54

  * xamarin/monodroid@16cb1cb1a: Bump to xamarin/androidtools/master@068e4f5 (#1084)
  * xamarin/monodroid@8f61f0cae: Bump to xamarin/android-sdk-installer/master@d9276b4 (#1085)
  * xamarin/monodroid@bec720cd0: Bump to xamarin/jar2xml@4125da65 (#1083)
  * xamarin/monodroid@a49e901d6: [tools/msbuild] update <BuildApk/> task inputs (#1082)
  * xamarin/monodroid@b9f16c002: Bump to xamarin/androidtools/master@5412dc8 (#1081)
  * xamarin/monodroid@673a74961: [.NET 5] fix for ALC isolation between assemblies (#1080)
jonpryor added a commit that referenced this pull request Apr 23, 2020
Changes: https://github.com/xamarin/monodroid/compare/70a11642ad39b6b647e02f0df62c84f8e6c2e1f9...d35c4221bb1c9b52b5280a4380598aaa95b332b8

  * xamarin/monodroid@d35c4221b: Bump to xamarin/jar2xml@4125da65 (#1083)
  * xamarin/monodroid@ea68087b0: [tools/msbuild] update <BuildApk/> task inputs (#1082)
  * xamarin/monodroid@16c2eb29e: Bump to xamarin/androidtools/d16-7@fba677c4 (#1081)
  * xamarin/monodroid@53abd4f03: [.NET 5] fix for ALC isolation between assemblies (#1080)
@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.

6 participants