Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context: https://github.com/dotnet/designs/pull/188/files#diff-8fcaa29d8e6f00b34b3cb1830d93f33e75f04424780a66a3c658c7021048e74fR125

The $(PackageId) of our workload .nupkg needs to be:

Microsoft.NET.Sdk.Android.Manifest-6.0.100

While the $(PackageVersion) remains the same as before.

The layout on disk will change to:

dotnet\sdk-manifests\6.0.100\Microsoft.NET.Sdk.Android\
    WorkloadManifest.json
    WorkloadManifest.targets

Note that .Manifest and -6.0.100 are not in the folder name on disk.

At the same time, let's also update the version in
WorkloadManifest.json so it contains the proper version for our
workload. This used to not be possible because version was a long,
but it now is a string where we can put our version.

Context: https://github.com/dotnet/designs/pull/188/files#diff-8fcaa29d8e6f00b34b3cb1830d93f33e75f04424780a66a3c658c7021048e74fR125

The `$(PackageId)` of our workload `.nupkg` needs to be:

    Microsoft.NET.Sdk.Android.Manifest-6.0.100

While the `$(PackageVersion)` remains the same as before.

The layout on disk will change to:

    dotnet\sdk-manifests\6.0.100\Microsoft.NET.Sdk.Android\
        WorkloadManifest.json
        WorkloadManifest.targets

Note that `.Manifest` and `-6.0.100` are not in the folder name on disk.

At the same time, let's also update the `version` in
`WorkloadManifest.json` so it contains the proper version for our
workload. This used to not be possible because `version` was a `long`,
but it now is a `string` where we can put our version.
@jonathanpeppers jonathanpeppers marked this pull request as ready for review May 1, 2021 03:40
@jonathanpeppers jonathanpeppers requested a review from pjcollins May 1, 2021 03:40
jonathanpeppers added a commit to jonathanpeppers/xamarin-macios that referenced this pull request May 4, 2021
….100

Context: https://github.com/dotnet/designs/pull/188/files#diff-8fcaa29d8e6f00b34b3cb1830d93f33e75f04424780a66a3c658c7021048e74fR125
Context: dotnet/android#5898

The `$(PackageId)` of our workload `.nupkg` needs to be:

    Microsoft.NET.Sdk._platform_.Manifest-6.0.100

While the `$(PackageVersion)` remains the same as before.

The layout on disk will change to:

    dotnet\sdk-manifests\6.0.100\Microsoft.NET.Sdk._platform_\
        WorkloadManifest.json
        WorkloadManifest.targets

Note that `.Manifest` and `-6.0.100` are not in the folder name on disk.

At the same time, let's also update the `version` in
`WorkloadManifest.json` so it contains the proper version for our
workload. This used to not be possible because `version` was a `long`,
but it now is a `string` where we can put our version.
@jonathanpeppers
Copy link
Member Author

@jonpryor on the weird filename:

Successfully created package 'C:\src\xamarin-android\bin\BuildDebug\nuget-unsigned\Microsoft.NET.Sdk.Android.Manifest-6.0.100.11.0.200-ci.microsoft-net-sdk-android-manifest.255.nupkg'.

We were discussing how weird 6.0.100.11.0.200 looks. It appears that NuGet basically does $(PackageId).$(PackageVersion), and we were wanting to put - as a delimiter instead of ..

It appears there isn't an MSBuild property for the filename for NuGet:

image

The only option that seems even close is $(OutputFileNamesWithoutVersion), but I don't think we should remove the version from the file name.

Relevant source code:

https://github.com/NuGet/NuGet.Client/blob/c529bd75d247430ed19b1713041de0b5b240ef0d/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets#L220-L281

I think for now, we go with this as-is? The file name is weird, but no one should be using this file directly.

@jonpryor jonpryor merged commit 5400522 into dotnet:main May 5, 2021
@jonathanpeppers jonathanpeppers deleted the microsoft.net.sdk.android.manifest branch May 5, 2021 19:49
@jonathanpeppers
Copy link
Member Author

Filed an issue about the NuGet file name here: NuGet/Home#10834

rolfbjarne pushed a commit to dotnet/macios that referenced this pull request May 6, 2021
….100 (#11436)

* [dotnet] rename workload to Microsoft.NET.Sdk._platform_.Manifest-6.0.100

Context: https://github.com/dotnet/designs/pull/188/files#diff-8fcaa29d8e6f00b34b3cb1830d93f33e75f04424780a66a3c658c7021048e74fR125
Context: dotnet/android#5898

The `$(PackageId)` of our workload `.nupkg` needs to be:

    Microsoft.NET.Sdk._platform_.Manifest-6.0.100

While the `$(PackageVersion)` remains the same as before.

The layout on disk will change to:

    dotnet\sdk-manifests\6.0.100\Microsoft.NET.Sdk._platform_\
        WorkloadManifest.json
        WorkloadManifest.targets

Note that `.Manifest` and `-6.0.100` are not in the folder name on disk.

At the same time, let's also update the `version` in
`WorkloadManifest.json` so it contains the proper version for our
workload. This used to not be possible because `version` was a `long`,
but it now is a `string` where we can put our version.

* Use $(DOTNET6_VERSION_BAND)

* Pass in -p:VersionBand to 'dotnet pack'
jonathanpeppers added a commit to jonathanpeppers/installer that referenced this pull request May 6, 2021
Context: https://github.com/dotnet/designs/pull/188/files#diff-8fcaa29d8e6f00b34b3cb1830d93f33e75f04424780a66a3c658c7021048e74fR125
Context: dotnet/android#5898
Context: dotnet/macios#11436

The Xamarin workload manifest packages have been renamed to have a `$(PackageId)` of:

    Microsoft.NET.Sdk.[platform].Manifest-6.0.100

The `dotnet` directory on disk is expected to contain:

    dotnet\sdk-manifests\6.0.100\Microsoft.NET.Sdk.[platform]\
        WorkloadManifest.json
        WorkloadManifest.targets

I manually tested `.\build.cmd -pack -publish` which produced
`artifacts\**\dotnet-sdk-6.0.100-dev-win-x64.exe`. After installing
it, I can see the "advertising manifest" feature seems to be working:

    > dotnet workload install microsoft-android-sdk-full --configfile NuGet.config
    Updated advertising manifest microsoft.net.sdk.android.
    Updated advertising manifest microsoft.net.sdk.ios.
    Updated advertising manifest microsoft.net.sdk.maccatalyst.
    Updated advertising manifest microsoft.net.sdk.macos.
    Updated advertising manifest microsoft.net.sdk.tvos.
    Failed to update the advertising manifest microsoft.net.workload.blazorwebassembly: microsoft.net.workload.blazorwebassembly.manifest-6.0.100 is not found in NuGet feeds https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json, https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json, https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json",
    Installing pack Microsoft.Android.Sdk version 11.0.200-ci.main.256...
    Writing workload pack installation record for Microsoft.Android.Sdk version 11.0.200-ci.main.256...
    Installing pack Microsoft.Android.Sdk.BundleTool version 11.0.200-ci.main.256...
    Writing workload pack installation record for Microsoft.Android.Sdk.BundleTool version 11.0.200-ci.main.256...
    Installing pack Microsoft.Android.Ref version 11.0.200-ci.main.256...
    Writing workload pack installation record for Microsoft.Android.Ref version 11.0.200-ci.main.256...
    Installing pack Microsoft.Android.Templates version 11.0.200-ci.main.256...
    Writing workload pack installation record for Microsoft.Android.Templates version 11.0.200-ci.main.256...
    Garbage collecting for SDK feature bands 6.0.100...
    Successfully installed workload(s) microsoft-android-sdk-full.

Then I'm able to build and run an Android application using the installed workload:

    > dotnet build HelloAndroid -t:Run
    ...
    Build succeeded.
        0 Warning(s)
        0 Error(s)
    Time Elapsed 00:00:21.76
jonathanpeppers added a commit to dotnet/maui that referenced this pull request May 11, 2021
jonathanpeppers pushed a commit to dotnet/maui that referenced this pull request May 13, 2021
Changes: dotnet/android@c60635b...4182e1f
Changes: dotnet/installer@0b60950...8e4d77c

Microsoft.Android.Sdk.Windows
 From Version 11.0.200-ci.main.250 -> To Version 11.0.200-ci.main.260

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.5.21229.1 -> To Version 6.0.100-preview.5.21255.8 (parent: Microsoft.Android.Sdk.Windows

~~ Other changes ~~

* Workload manifest packages were renamed

See: dotnet/installer#10538
See: dotnet/android#5898

* Patch up `version` in `WorkloadManifest.json`

If you don't have the very latest MSBuild 16.10, then the workload
resolver fails with:

    The SDK resolver "Microsoft.DotNet.MSBuildSdkResolver" failed to run. Missing or invalid manifest version

We changed the version number in our workloads to a string and some
older MSBuild versions are still expecting an integer
value.Temporarily put an integer in place of `version`, which we can
hopefully remove down the road.

Co-authored-by: Jonathan Peppers <[email protected]
lytico pushed a commit to lytico/maui that referenced this pull request May 15, 2021
Changes: dotnet/android@c60635b...4182e1f
Changes: dotnet/installer@0b60950...8e4d77c

Microsoft.Android.Sdk.Windows
 From Version 11.0.200-ci.main.250 -> To Version 11.0.200-ci.main.260

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.5.21229.1 -> To Version 6.0.100-preview.5.21255.8 (parent: Microsoft.Android.Sdk.Windows

~~ Other changes ~~

* Workload manifest packages were renamed

See: dotnet/installer#10538
See: dotnet/android#5898

* Patch up `version` in `WorkloadManifest.json`

If you don't have the very latest MSBuild 16.10, then the workload
resolver fails with:

    The SDK resolver "Microsoft.DotNet.MSBuildSdkResolver" failed to run. Missing or invalid manifest version

We changed the version number in our workloads to a string and some
older MSBuild versions are still expecting an integer
value.Temporarily put an integer in place of `version`, which we can
hopefully remove down the road.

Co-authored-by: Jonathan Peppers <[email protected]
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 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