Skip to content

Conversation

@kzu
Copy link
Contributor

@kzu kzu commented May 30, 2017

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=56867

It turns out that having a package definition in the pkgdef
without a corresponding Package entry in the same file, makes
it impossible for VS to find the associated resources with the
given IDs (#400 for the icon, #110 and #112 for the name and
description).

It also turns out that even if were to do without the icon,
using plain strings for #110/112 doesn't work either, and the
package entry has to be there anyway, alongside the assembly
and code base.

Therefore, just add it to the VSIX payload so that VS can use
it to locate those resources for Help/About and nothing else.

Since we still tell the VSSDK targets not to create the PKGDEF
from the Package-derived class, this should still mean it's a
plain IL compilation for xbuild/MacOSX and hopefully it won't
break anything.

NOTE: the AssemblyName has to match what's in the PKGDEF, so
we made it match with the official one too. Since this assembly
name isn't used for anything at run-time, it's fine to leave it
as-is with no changes.

The new gazillion packages/references are needed just so the
AndroidSdkPackage class can inherit from Package as expected
by VS.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=56867

It turns out that having a *package* definition in the pkgdef
without a corresponding Package entry in the same file, makes
it impossible for VS to find the associated resources with the
given IDs (#400 for the icon, #110 and #112 for the name and
description).

It also turns out that even if were to do without the icon,
using plain strings for #110/112 doesn't work either, and the
package entry has to be there anyway, alongside the assembly
and code base.

Therefore, just add it to the VSIX payload so that VS can use
it to locate those resources for Help/About and nothing else.

Since we still tell the VSSDK targets *not* to create the PKGDEF
from the Package-derived class, this should still mean it's a
plain IL compilation for xbuild/MacOSX and hopefully it won't
break anything.

NOTE: the AssemblyName has to match what's in the PKGDEF, so
we made it match with the official one too. Since this assembly
name isn't used for anything at run-time, it's fine to leave it
as-is with no changes.

The new gazillion packages/references are needed just so the
AndroidSdkPackage class can inherit from Package as expected
by VS.
<OutputType>Library</OutputType>
<RootNamespace>Xamarin.Android.Sdk</RootNamespace>
<AssemblyName>Xamarin.Android.Sdk-OSS</AssemblyName>
<AssemblyName>Xamarin.Android.Sdk</AssemblyName>
Copy link
Contributor

Choose a reason for hiding this comment

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

Since $(AsemblyName) is changed, this should also change the _GetVsixPath target in create-vsix.targets to re-add -OSS

      <VsixPath Condition=" '$(VsixPath)' == '' ">..\..\bin\Build$(Configuration)\$(AssemblyName)-OSS-$(ProductVersion).$(XAVersionCommitCount)_$(XAVersionBranch)_$(XAVersionHash).vsix</VsixPath>

The reason for this is so that you can sanely download both commercial and OSS .vsix files into the same directory without fearing for filename collisions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume that on the commercial build that property will be set to the non-OSS suffixed version?

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct, the commercial build overrides the $(VsixPath) property.

@jonpryor jonpryor merged commit 4372184 into dotnet:master May 31, 2017
@kzu kzu deleted the vsix-registration branch May 31, 2017 14:10
jonpryor pushed a commit to jonpryor/xamarin-android that referenced this pull request Jun 5, 2017
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=56867

It turns out that having a *package* definition in the pkgdef
without a corresponding Package entry in the same file, makes
it impossible for VS to find the associated resources with the
given IDs (dotnet#400 for the icon, dotnet#110 and dotnet#112 for the name and
description).

It also turns out that even if were to do without the icon,
using plain strings for dotnet#110/112 doesn't work either, and the
package entry has to be there anyway, alongside the assembly
and code base.

Therefore, just add it to the VSIX payload so that VS can use
it to locate those resources for Help/About and nothing else.

Since we still tell the VSSDK targets *not* to create the PKGDEF
from the Package-derived class, this should still mean it's a
plain IL compilation for xbuild/MacOSX and hopefully it won't
break anything.

NOTE: the AssemblyName has to match what's in the PKGDEF, so
we made it match with the official one too. Since this assembly
name isn't used for anything at run-time, it's fine to leave it
as-is with no changes.

The new gazillion packages/references are needed just so the
AndroidSdkPackage class can inherit from Package as expected
by VS.
jonpryor pushed a commit that referenced this pull request Jun 6, 2017
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=56867

It turns out that having a *package* definition in the pkgdef
without a corresponding Package entry in the same file, makes
it impossible for VS to find the associated resources with the
given IDs (#400 for the icon, #110 and #112 for the name and
description).

It also turns out that even if were to do without the icon,
using plain strings for #110/112 doesn't work either, and the
package entry has to be there anyway, alongside the assembly
and code base.

Therefore, just add it to the VSIX payload so that VS can use
it to locate those resources for Help/About and nothing else.

Since we still tell the VSSDK targets *not* to create the PKGDEF
from the Package-derived class, this should still mean it's a
plain IL compilation for xbuild/MacOSX and hopefully it won't
break anything.

NOTE: the AssemblyName has to match what's in the PKGDEF, so
we made it match with the official one too. Since this assembly
name isn't used for anything at run-time, it's fine to leave it
as-is with no changes.

The new gazillion packages/references are needed just so the
AndroidSdkPackage class can inherit from Package as expected
by VS.
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 30, 2020
jonpryor added a commit that referenced this pull request Mar 31, 2020
@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.

3 participants