Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

'Restore failed for ... /Openchain/Openchain.csproj.' error when running OpenChain project #74

@eveyw

Description

@eveyw

Steps to reproduce

I was following the steps given by OpenChain platform (https://docs.openchain.org/en/latest/general/running-openchain.html). And coz the dotnet version specified in the original files is 1.0.4, so I did migration. After migration, 'dotnet restore' failed in .csproj file.

In Openchain.csproj:

<RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win+wpa81+wp80+Xamarin.iOS10+MonoAndroid10+MonoTouch10</PackageTargetFallback>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" />
<PackageReference Include="Openchain.Server" Version="0.6.2" />
<PackageReference Include="Openchain.Anchoring.Blockchain" Version="0.6.2" />
<PackageReference Include="Openchain.Sqlite" Version="0.6.2" />
<PackageReference Include="Openchain.SqlServer" Version="0.6.2" />
<PackageReference Include="Openchain.Validation.PermissionBased" Version="0.6.2" />

Expected behavior

The OpenChain APP restores successfully and runs.

Actual behavior

$ dotnet restore
Restoring packages for /Users/eveyw/Desktop/Blockchain/Openchain/Openchain.csproj...
/Users/eveyw/Desktop/Blockchain/Openchain/Openchain.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.1.1)
/Users/eveyw/Desktop/Blockchain/Openchain/Openchain.csproj : error NU1102: - Found 31 version(s) in nuget.org [ Nearest version: 2.1.0-preview2-26406-04 ]
/Users/eveyw/Desktop/Blockchain/Openchain/Openchain.csproj : error NU1102: - Found 2 version(s) in /usr/local/share/dotnet/sdk/NuGetFallbackFolder [ Nearest version: 2.0.6 ]
Generating MSBuild file /Users/eveyw/Desktop/Blockchain/Openchain/obj/Openchain.csproj.nuget.g.props.
Generating MSBuild file /Users/eveyw/Desktop/Blockchain/Openchain/obj/Openchain.csproj.nuget.g.targets.
Restore failed in 1.61 sec for /Users/eveyw/Desktop/Blockchain/Openchain/Openchain.csproj.

Environment data

dotnet --info output:

.NET Command Line Tools (2.1.105)

Product Information:
Version: 2.1.105
Commit SHA-1 hash: 141cc8d976

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.13-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.105/

Microsoft .NET Core Shared Framework Host

Version : 2.0.7
Build : 2d61d0b043915bc948ebf98836fefe9ba942be11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions