{"push_id":2519657680,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"cb30a13b144786891997184f2fcc161191db6f1c","before":"166e7d523b5cea5971276f45c237298c65561c29","commits":[{"sha":"09beb90b0b7fae8c41139dea2214ce1f14e6df77","author":{"name":"Jonathan Peppers","email":"bada9c05996b779e3b1d99a9591d4bfcbe6ff4f4@gmail.com"},"message":"[build] Standardize Microsoft.Build.*.dll References (#1600)\n\nContext: https://github.com/xamarin/xamarin-android/pull/1465\r\n\r\nIn PR #1465, @grendello added `Xamarin.ProjectTools` and a new test\r\nproject to `Xamarin.Android-Tests.sln`. The problem with this is that\r\n`xabuild.exe` builds the test solution, and if there is a project\r\nreferencing `Microsoft.Build.Framework` it will use a *different*\r\n`Microsoft.Build.Framework.dll` than if you built the projects with\r\nplain `msbuild`.\r\n\r\nAn example of failing commands when `Xamarin.ProjectTools` is in\r\n`Xamarin.Android-Tests.sln`:\r\n\r\n\tmake prepare all all-tests\r\n\tmake run-nunit-tests TEST=Xamarin.Android.Build.Tests.BuildTest.ValidateJavaVersion\r\n\r\nResults with the exception:\r\n\r\n\tSystem.MissingMethodException : void Xamarin.ProjectTools.Builder.set_Verbosity(Microsoft.Build.Framework.LoggerVerbosity)\r\n\t    at Xamarin.Android.Build.Tests.BuildHelper.CreateApkBuilder (System.String directory, System.Boolean cleanupAfterSuccessfulBuild, System.Boolean cleanupOnDispose)\r\n\t    at Xamarin.Android.Build.Tests.BaseTest.CreateApkBuilder (System.String directory, System.Boolean cleanupAfterSuccessfulBuild, System.Boolean cleanupOnDispose)\r\n\t    at Xamarin.Android.Build.Tests.BuildTest.ValidateJavaVersion (System.String targetFrameworkVersion, System.String buildToolsVersion, System.String javaVersion, System.String latestSupportedJavaVersion, System.Boolean expectedResult)\r\n\r\n\r\nTo recap:\r\n\r\n  - `msbuild Xamarin.Android.sln` uses system/GAC\r\n    `Microsoft.Build.Framework.dll`\r\n  - `bin\\Debug\\bin\\xabuild Xamarin.Android.sln` uses a *different*\r\n    `Microsoft.Build.Framework.dll` from `msbuild`\r\n\r\nChanges to fix this:\r\n\r\n  - Created a `MSBuildReferences.projitems` as a standard way to\r\n    import the `Microsoft.Build.*.dll` references\r\n  - Used `%(Reference.HintPath)` to reference MSBuild proper, the\r\n    same way that `xabuild.csproj` was doing\r\n  - Went through any project needing these references, and imported\r\n    `MSBuildReferencePath.projitems` instead of declaring references\r\n  - Projects referencing additional MSBuild assemblies can use the\r\n    new `$(MSBuildReferencePath)` variable if needed\r\n  - A few projects needed `$(TargetFrameworkVersion)` of at least\r\n    v4.6 in order to build on Windows. I chose `4.6.2` since\r\n    `Xamarin.Android.Build.Tests` was already using this version.\r\n  - Projects were referencing `Microsoft.Build.Utilities.v4.0`, which\r\n    is a way to support MSBuild 4.0. This is not available with\r\n    latest MSBuild, so now using `Microsoft.Build.Utilities.Core`.","distinct":true,"url":"https://api.github.com/repos/jonathanpeppers/xamarin-android/commits/09beb90b0b7fae8c41139dea2214ce1f14e6df77"},{"sha":"cb30a13b144786891997184f2fcc161191db6f1c","author":{"name":"Jonathan Peppers","email":"bada9c05996b779e3b1d99a9591d4bfcbe6ff4f4@gmail.com"},"message":"[build] $(XAIncludeProprietaryBits) for debugging/fastdev (#1595)\n\nContext: https://github.com/xamarin/xamarin-android/issues/1577\r\n\r\nCurrently the open source `xamarin-android` bits do not support\r\ndebugging, fast deployment, and (perhaps?) other features. These are\r\nimplemented in the proprietary sources of Xamarin.Android, but there\r\n*should* be a way to use these features if you have the commercial\r\nversion of Xamarin.Android installed on your system.\r\n\r\nTo support this:\r\n\r\n  - Added the new `$(XAIncludeProprietaryBits)` MSBuild property\r\n  - Added a new `proprietary.csproj` project that copies specific\r\n    proprietary files from your system's Xamarin.Android to the build\r\n    output of `xamarin-android` when `$(XAIncludeProprietaryBits)`=True\r\n  - Emit a warning if `$(XAIncludeProprietaryBits)` is enabled\r\n\r\nThis feature allowed me to debug a Xamarin.Android app containing a\r\nchange in `Mono.Android.dll` on Windows:\r\n\r\n 1. Installed a commercial master build (VSIX) of Xamarin.Android\r\n    into my VS 2017 15.7 Preview\r\n\r\n 2. Made a change to `Mono.Android` in `Android.App.Activity`, where\r\n    I added a new method\r\n\r\n 3. Built my local OSS copy of Xamarin.Android:\r\n\r\n        msbuild Xamarin.Android.sln /t:Prepare\r\n        msbuild Xamarin.Adnroid.sln /p:XAIncludeProprietaryBits=True\r\n\r\n    *NOTE*: my `msbuild` is: `C:\\Program Files (x86)\\Microsoft Visual Studio\\Preview\\Enterprise\\MSBuild\\15.0\\Bin\\MSBuild.exe`\r\n\r\n 4. Launched an elevated\r\n    **Developer Command Prompt for VS 2017 Preview**\r\n\r\n 5. Navigated to my `xamarin-android` checkout directory and ran\r\n    `bin\\Debug\\bin\\setup-windows.exe`; see also:\r\n    Documentation/workflow/UsingYourBuild.md#windows-system-wide-installation\r\n\r\n 6. Opened VS 2017 Preview and created a new Xamarin.Android project\r\n    targeting v8.1\r\n\r\n 7. Disabled \"fast deployment\" and \"shared runtime\", since I have a\r\n    modification in `Mono.Android.dll`\r\n\r\n 8. Used my new method in `Android.App.Activity`, I was also able to\r\n    \"step\" into the method while debugging\r\n\r\nNote: packages built when `$(XAIncludeProprietaryBits)`=True must be\r\ndistributed under the commercial Xamarin.Android/Visual Studio 2017 EULA.\r\n\r\nFuture plans: macOS support.","distinct":true,"url":"https://api.github.com/repos/jonathanpeppers/xamarin-android/commits/cb30a13b144786891997184f2fcc161191db6f1c"}]}
{"actor":{"display_login":"jonathanpeppers"}}