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

net7.0-ios16.1 depends on non-existent Microsoft.AspNetCore.App.Ref 7.0.20 #102214

Open
bnickel opened this issue May 14, 2024 · 5 comments
Open
Labels
area-Setup os-ios Apple iOS packaging Related to packaging untriaged New issue has not been triaged by the area owner

Comments

@bnickel
Copy link

bnickel commented May 14, 2024

Description

I have a library with <TargetFramework>net7.0-ios</TargetFramework>. Running dotnet build fails with error NU1102: Unable to find package Microsoft.NETCore.App.Ref with version (= 7.0.20)

Reproduction Steps

Create the following csproj:

<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<TargetFramework>net7.0-ios</TargetFramework>
	</PropertyGroup>
</Project>

Run dotnet build

Expected behavior

The build succeeds.

Actual behavior

The build fails with the following message:

dotnet build -c Release HeapInc.Xamarin.iOS
  Determining projects to restore...
.../HeapInc.Xamarin.iOS.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Ref with version (= 7.0.20)
.../HeapInc.Xamarin.iOS.csproj : error NU1102:   - Found 112 version(s) in nuget.org [ Nearest version: 8.0.0-preview.1.23110.8 ]
.../HeapInc.Xamarin.iOS.csproj : error NU1102:   - Found 0 version(s) in /usr/local/share/dotnet/library-packs
.../HeapInc.Xamarin.iOS.csproj : error NU1102: Unable to find package Microsoft.AspNetCore.App.Ref with version (= 7.0.20)
.../HeapInc.Xamarin.iOS.csproj : error NU1102:   - Found 113 version(s) in nuget.org [ Nearest version: 8.0.0-preview.1.23112.2 ]
.../HeapInc.Xamarin.iOS.csproj : error NU1102:   - Found 0 version(s) in /usr/local/share/dotnet/library-packs
  Failed to restore .../HeapInc.Xamarin.iOS.csproj (in 326 ms).

Build FAILED.

The .nuget.dgspec.json contains the following:

        "frameworks": {
          "net7.0-ios16.1": {
            "targetAlias": "net7.0-ios",
            "projectReferences": {}
          }
        },

And:

      "frameworks": {
        "net7.0-ios16.1": {
          "targetAlias": "net7.0-ios",
          "dependencies": {
            "Microsoft.NET.ILLink.Analyzers": {
              "suppressParent": "All",
              "target": "Package",
              "version": "[7.0.100-1.23401.1, )",
              "autoReferenced": true
            },
            "Microsoft.NET.ILLink.Tasks": {
              "suppressParent": "All",
              "target": "Package",
              "version": "[7.0.100-1.23401.1, )",
              "autoReferenced": true
            }
          },
          "imports": [
            "net461",
            "net462",
            "net47",
            "net471",
            "net472",
            "net48",
            "net481"
          ],
          "assetTargetFallback": true,
          "warn": true,
          "downloadDependencies": [
            {
              "name": "Microsoft.AspNetCore.App.Ref",
              "version": "[7.0.20, 7.0.20]"
            },
            {
              "name": "Microsoft.NETCore.App.Ref",
              "version": "[7.0.20, 7.0.20]"
            }
          ],
          "frameworkReferences": {
            "Microsoft.iOS": {
              "privateAssets": "all"
            },
            "Microsoft.NETCore.App": {
              "privateAssets": "all"
            }
          },
          "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/8.0.301/RuntimeIdentifierGraph.json"
        }
      }

Regression?

No response

Known Workarounds

No response

Configuration

dotnet 8.0.301
macOS 14.4.1
Arm64

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 14, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 14, 2024
@filipnavara filipnavara added the packaging Related to packaging label May 14, 2024
@MagicAndre1981
Copy link

.net 7.0 is out of support now, so change 7.0 to 8.0

.NET 7 will reach end of support on May 14, 2024. After that, Microsoft will no longer provide servicing updates, including security fixes or technical support, for .NET 7. You’ll need to update to .NET 8 before this date into stay supported.

@filipnavara
Copy link
Member

.net 7.0 is out of support now, so change 7.0 to 8.0

This seems to be breakage in the last .NET 7.0 update. It should be fixed regardless of the support status.

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 17, 2024
@NikolaMilosavljevic
Copy link
Member

[Triage] @bnickel it look like you're running a pre-release version of the .NET SDK, is that correct?

@NikolaMilosavljevic NikolaMilosavljevic removed the untriaged New issue has not been triaged by the area owner label May 21, 2024
@MichaelSimons
Copy link
Member

[Triage] @bnickel it look like you're running a pre-release version of the .NET SDK, is that correct?

If that is true, you need a nuget.config that is configured to with the prerelease feeds to acquire the 7.0 runtime from.

@MichaelSimons MichaelSimons added the untriaged New issue has not been triaged by the area owner label May 21, 2024
@MagicAndre1981
Copy link

7.0.20 and SDK 8.0.301 are now officially released to fix a security issue. So this should now work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Setup os-ios Apple iOS packaging Related to packaging untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

7 participants