Skip to content

Preview2 packages missing? #9162

Description

@ghost

In Alpine 3.7, i tried 3.6 tarball:

docker run -it alpine:latest
apk update
apk add curl libstdc++ libunwind libintl icu openssl

curl -O https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-alpine.3.6-x64.tar.gz
mkdir -p /usr/bin/dotnet
tar -xzvf dotnet-sdk-latest-alpine.3.6-x64.tar.gz  -C /usr/bin/dotnet
export PATH=$PATH:/usr/bin/dotnet
rm dotnet-sdk-latest-alpine.3.6-x64.tar.gz

After that when i run dotnet new console -n testconsole, i get

Processing post-creation actions...
Running 'dotnet restore' on testconsole/testconsole.csproj...
  Restoring packages for /testconsole/testconsole.csproj...
/testconsole/testconsole.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.1.0-preview2-26309-01)
/testconsole/testconsole.csproj : error NU1102:   - Found 24 version(s) in nuget.org [ Nearest version: 2.1.0-preview1-26216-03 ]
  Generating MSBuild file /testconsole/obj/testconsole.csproj.nuget.g.props.
  Generating MSBuild file /testconsole/obj/testconsole.csproj.nuget.g.targets.
  Restore failed in 206.09 ms for /testconsole/testconsole.csproj.

Restore failed.
Post action failed.
Description: Restore NuGet packages required by this project.
Manual instructions: Run 'dotnet restore'

Unable to find package Microsoft.NETCore.App with version (>= 2.1.0-preview2-26309-01)
Nearest version: 2.1.0-preview1-26216-03

Activity

  1. Petermarcu commented on Mar 11, 2018

    @Petermarcu
    Member

    My guess is that its trying to resolve the packages from Nuget.org. In order to resolve packages that are part of the dev feeds, you need to make sure you have the dotnet-core myget feed in a nuget.config: https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

  2. Petermarcu commented on Mar 11, 2018

    @Petermarcu
    Member
  3. Petermarcu commented on Mar 12, 2018

    @Petermarcu
    Member

    We had done that in the past and could consider again. @livarcocc thoughts? I recall we had some challenges with making sure that nuget.config never got into a release build and it was just safer to keep them the same. @kasper3 you could open an issue specifically about that if you'd like.

  4. livarcocc commented on Mar 12, 2018

    @livarcocc
    Contributor

    The CLI does not modify the global NuGet.Config file. In the past, we had dotnet new drop a NuGet.Config file when projects were created, but that ended up leading to confusion, so we took it out.

    We have an issue to update our nightly build instructions to include the step to add necessary feeds. I would like to go with that before trying anything else.

    We will use https://github.com/dotnet/cli/issues/8291 to track improving those instructions.

  5. livarcocc commented on Mar 12, 2018

    @livarcocc
    Contributor

    Yes, for a nightly build I believe it is fine to require a NuGet.Config.

    Also note that the NuGet.Config does not need to be in the directory above, you can place it right next tot he project you just created, which is what we used to do.

  6. transferred this issue fromdotnet/clion Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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