Skip to content

Commit

Permalink
[build] NuGet source changes to build with .NET 8 RC 1
Browse files Browse the repository at this point in the history
* Remove `<packageSourceMapping>` to avoid errors like:

    Package source mapping matches found for package ID 'Microsoft.NETCore.App.Ref' are: 'dotnet-public'.
    ...
    D:\src\xamarin-android\external\Java.Interop\src\Java.Interop.Tools.Expressions\Java.Interop.Tools.Expressions.csproj error NU1102: Unable to find package Microsoft.NETCore.App.Ref with version (= 7.0.11)
    - Found 83 version(s) in dotnet-public [ Nearest version: 8.0.0-preview.1.23110.8 ]
    - Versions from dotnet-eng were not considered [D:\src\xamarin-android\Xamarin.Android.sln]

* Add feeds for dotnet/runtime 7.0.11 and 6.0.22.

* Set `$(DisableTransitiveFrameworkReferenceDownloads)` to avoid restore
  errors like:

    error NU1102: Unable to find package Microsoft.WindowsDesktop.App.Ref with version (= 7.0.11)
    error NU1102: Unable to find package Microsoft.AspNetCore.App.Ref with version (= 7.0.11)
  • Loading branch information
jonathanpeppers committed Aug 22, 2023
1 parent 5adb4d4 commit 81c228d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- Note: MUST be imported *after* $(Configuration) is set! -->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
<_OutputPath>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\</_OutputPath>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
Expand Down
14 changes: 4 additions & 10 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" protocolVersion="3" />
<!-- For Microsoft.DotNet.GenAPI -->
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" />
<!-- Added manually for dotnet/runtime 7.0.11 -->
<add key="darc-pub-dotnet-runtime-a2ad4f0" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-a2ad4f03/nuget/v3/index.json" />
<!-- Added manually for dotnet/runtime 6.0.22 -->
<add key="darc-pub-dotnet-runtime-762f437" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-762f4379/nuget/v3/index.json" />
</packageSources>

<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="dotnet-public">
<package pattern="*" />
</packageSource>
<packageSource key="dotnet-eng">
<package pattern="Microsoft.DotNet.GenAPI" />
</packageSource>
</packageSourceMapping>
</configuration>

0 comments on commit 81c228d

Please sign in to comment.