Skip to content

Conversation

@jonpryor
Copy link
Contributor

Reduce the number of differences between the .vsix file we build and
the Xamarin.Android.Sdk*.vsix file which is provided commercially:

  • The $(VsixVersion) wasn't a valid version value; it was e.g.
    7.3.99. (note trailing .). This was caused by
    611bb66, which removed $(_XACommitCount), replacing it with
    `$(XAVersionCommitCount).

  • Default to $(IsProductComponent)=True, and separate its logic from
    $(IsExperimental). $(IsProductComponent) alters the value of
    the packages[0].id value within catalog.json: when
    $(IsProductComponent) is False, packages[0].id *starts with* Component, e.g. Component.Xamarin.Android.Sdk`, which is wrong.

    I'm still not sure why $(IsProductComponent) and
    $(IsExperimental) were previously tied together as they were.

  • Set $(ExtensionInstallationFolder) so that the
    packages[0].extensionDir value within catalog.json doesn't
    contain a random filename. Previously, it would be e.g.:

      "extensionDir":"[installdir]\\Common7\\IDE\\Extensions/x11jqb13.6u5
    

    Setting $(ExtensionInstallationFolder) allows this to instead be:

      "extensionDir":"[installdir]\\Common7\\IDE\\Extensions/Xamarin.Android.Sdk
    

    TODO/Note: I suspect that the Microsoft.VSSDK.BuildTools code
    which creates extensionDir is using Path.Combine(), because
    we're getting a .../Xamarin.Android.Sdk value (/ is used).
    The existing commercial package uses \\ consistently.

    I don't know if this will be a problem.

  • Set %(Content.IncludeInVSIX)=True for AndroidSdkPackage.ico, so
    that it is included in the .vsix file.

  • Create the files
    bin\$(Configuration)\lib\xbuild\Xamarin\Android\Version.txt and
    bin\$(Configuration)\lib\mandroid\MULTIDEX_JAR_LICENSE.txt
    to work around Bug #54804 so that we have some form of
    Version* and MULTIDEX_JAR_LICENSE file within the .vsix.

  • Review the @(MSBuild) items. Apparently this construct:

      <MSBuild Remove="host-*\**\*" />
      <MSBuild Include="host-mxe-Win64\*.*" />
    

    doesn't behave as intended: host-mxe-Win64 is not added to the
    .vsix; the preceding %(MSBuild.Remove) takes precedence.

    Instead of removing "all bad" then adding the desired values, just
    remove the the undesirable values. (This means we might miss some,
    but at least this way we keep the values we want!)

Reduce the number of differences between the `.vsix` file we build and
the `Xamarin.Android.Sdk*.vsix` file which is provided commercially:

* The `$(VsixVersion)` wasn't a valid version value; it was e.g.
    `7.3.99.` (note trailing `.`). This was caused by
    611bb66, which removed `$(_XACommitCount)`, replacing it with
    `$(XAVersionCommitCount).

* Default to `$(IsProductComponent)`=True, and separate its logic from
    `$(IsExperimental)`. `$(IsProductComponent)` alters the value of
    the `packages[0].id` value within `catalog.json`: when
    `$(IsProductComponent)` is False, `packages[0].id *starts with*
    `Component`, e.g. `Component.Xamarin.Android.Sdk`, which is wrong.

    I'm still not sure why `$(IsProductComponent)` and
    `$(IsExperimental)` were previously tied together as they were.

* Set `$(ExtensionInstallationFolder)` so that the
    `packages[0].extensionDir` value within `catalog.json` doesn't
    contain a random filename. Previously, it would be e.g.:

        "extensionDir":"[installdir]\\Common7\\IDE\\Extensions/x11jqb13.6u5

    Setting `$(ExtensionInstallationFolder)` allows this to instead be:

        "extensionDir":"[installdir]\\Common7\\IDE\\Extensions/Xamarin.Android.Sdk

    TODO/Note: I suspect that the `Microsoft.VSSDK.BuildTools` code
    which creates `extensionDir` is using `Path.Combine()`, because
    we're getting a `.../Xamarin.Android.Sdk` value (`/` is used).
    The existing commercial package uses `\\` consistently.

    I don't know if this will be a problem.

* Set `%(Content.IncludeInVSIX)`=True for `AndroidSdkPackage.ico`, so
    that it is included in the `.vsix` file.

* Create the files
    `bin\$(Configuration)\lib\xbuild\Xamarin\Android\Version.txt` and
    `bin\$(Configuration)\lib\mandroid\MULTIDEX_JAR_LICENSE.txt`
    to work around Bug #54804 so that we have *some* form of
    `Version*` and `MULTIDEX_JAR_LICENSE` file within the `.vsix`.

* Review the `@(MSBuild)` items. Apparently this construct:

        <MSBuild Remove="host-*\**\*" />
        <MSBuild Include="host-mxe-Win64\*.*" />

    doesn't behave as intended: `host-mxe-Win64` is *not* added to the
    `.vsix`; the preceding `%(MSBuild.Remove)` takes precedence.

    Instead of removing "all bad" then adding the desired values, just
    remove the the undesirable values. (This means we might miss some,
    but at least this way we keep the values we want!)
@jonpryor jonpryor merged commit a554422 into dotnet:master May 25, 2017
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 20, 2020
Changes: dotnet/java-interop@cedf4d0...f7ea4ed

  * dotnet/java-interop@f7ea4ed: [Xamarin.Android.Tools.Bytecode-Tests] Remove obsolete files (dotnet#603)
  * dotnet/java-interop@e070ce3: [build] Remove <Imports/> now covered by Directory.Build.props (dotnet#607)
  * dotnet/java-interop@e7c5f54: [generator] Add netcoreapp3.1 support (dotnet#606)
  * dotnet/java-interop@95f698b: [build] Build additional `$(TargetFramework)` values. (dotnet#605)
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 20, 2020
Changes: dotnet/java-interop@cedf4d0...1a086ff

  * dotnet/java-interop@1a086ff: [Java.Interop.Tools.JavaCallableWrappers] Fix IsValidIdentifier() (dotnet#610)
  * dotnet/java-interop@f7ea4ed: [Xamarin.Android.Tools.Bytecode-Tests] Remove obsolete files (dotnet#603)
  * dotnet/java-interop@e070ce3: [build] Remove <Imports/> now covered by Directory.Build.props (dotnet#607)
  * dotnet/java-interop@e7c5f54: [generator] Add netcoreapp3.1 support (dotnet#606)
  * dotnet/java-interop@95f698b: [build] Build additional `$(TargetFramework)` values. (dotnet#605)
jonpryor added a commit that referenced this pull request Mar 21, 2020
Changes: dotnet/java-interop@cedf4d0...1a086ff

  * dotnet/java-interop@1a086ff: [Java.Interop.Tools.JavaCallableWrappers] Fix IsValidIdentifier() (#610)
  * dotnet/java-interop@f7ea4ed: [Xamarin.Android.Tools.Bytecode-Tests] Remove obsolete files (#603)
  * dotnet/java-interop@e070ce3: [build] Remove <Imports/> now covered by Directory.Build.props (#607)
  * dotnet/java-interop@e7c5f54: [generator] Add netcoreapp3.1 support (#606)
  * dotnet/java-interop@95f698b: [build] Build additional `$(TargetFramework)` values. (#605)
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 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.

3 participants