Skip to content
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

[One .NET] use **FromWorkload** for targeting/runtime pack versions #6184

Merged
merged 1 commit into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions Documentation/building/unix/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,7 @@ but this is only part of the story. Your local
local Android "workload" in `Microsoft.Android.Sdk.$(HostOS)` matching
your operating system.

To use the Android workload, you will need a `NuGet.config`:

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="local-xa" value="/full/path/to/bin/BuildDebug/nuget-unsigned" />
</packageSources>
</configuration>
```

The local package source in the `bin/BuildDebug/nuget-unsigned` directory is
currently needed for the Android runtime packages.

Then use a `.csproj` file such as:
Create a new project with `dotnet new android`:

```xml
<Project Sdk="Microsoft.NET.Sdk">
Expand Down
17 changes: 1 addition & 16 deletions Documentation/building/windows/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,7 @@ but this is only part of the story. Your local
populated with a local Android "workload" in
`Microsoft.Android.Sdk.$(HostOS)` matching your operating system.

To use the Android workload, you will need a `NuGet.config`:

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="local-xa" value="C:\full\path\to\bin\BuildDebug\nuget-unsigned" />
</packageSources>
</configuration>
```

The local package source in the `bin\BuildDebug\nuget-unsigned` directory is
currently needed for the Android runtime packages.

Then use a `.csproj` file such as:
Create a new project with `dotnet new android`:

```xml
<Project Sdk="Microsoft.NET.Sdk">
Expand Down
6 changes: 3 additions & 3 deletions build-tools/create-packs/Microsoft.Android.Sdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
Include="Microsoft.Android"
TargetFramework="$(_AndroidNETAppTargetFramework)"
RuntimeFrameworkName="Microsoft.Android"
DefaultRuntimeFrameworkVersion="$(AndroidPackVersionLong)"
LatestRuntimeFrameworkVersion="$(AndroidPackVersionLong)"
DefaultRuntimeFrameworkVersion="**FromWorkload**"
LatestRuntimeFrameworkVersion="**FromWorkload**"
TargetingPackName="Microsoft.Android.Ref"
TargetingPackVersion="$(AndroidPackVersionLong)"
TargetingPackVersion="**FromWorkload**"
RuntimePackNamePatterns="Microsoft.Android.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(_AndroidNETAppRuntimePackRids, '%3B')"
Profile="Android"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public abstract class XamarinProject
public IList<BuildItem> References { get; private set; }
public IList<Package> PackageReferences { get; private set; }
public string GlobalPackagesFolder { get; set; } = FileSystemUtils.FindNugetGlobalPackageFolder ();
public IList<string> ExtraNuGetConfigSources { get; set; }
public IList<string> ExtraNuGetConfigSources { get; set; } = new List<string> ();

public virtual bool ShouldRestorePackageReferences => PackageReferences?.Count > 0;
/// <summary>
Expand Down Expand Up @@ -98,12 +98,6 @@ public XamarinProject (string debugConfigurationName = "Debug", string releaseCo
</PropertyGroup>
</Project>"
});

// Feeds only needed for .NET 5+
ExtraNuGetConfigSources = new List<string> {
Path.Combine (XABuildPaths.BuildOutputDirectory, "nuget-unsigned"),
"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json",
};
} else {
SetProperty (KnownProperties.Configuration, () => Configuration);
}
Expand Down