Can i restore NuGet packages from a *public* MyGet feed?

Pure Krome's Avatar

Pure Krome

21 Oct, 2014 12:38 PM

Hi there,

is it possible to have my nuget restore step reference the official nuget feed *and* a public myget feed?

I have a nuget.config file in my root solution, eg...

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <add key="NancyFX-CI" value="https://www.myget.org/F/nancyfx/" />
    </packageSources>
</configuration>

But it's not using it..

...
Successfully installed 'Microsoft.AspNet.Razor 3.1.2'.
Successfully installed 'Microsoft.Bcl 1.1.9'.
Unable to find version '0.24-Pre1444' of package 'Nancy'.
Unable to find version '0.24-Pre1444' of package 'Nancy.Hosting.Aspnet'.
Unable to find version '0.24-Pre1444' of package 'Nancy.Viewengines.Razor'.
Command exited with code 1

I've also tried

Settings -> Environment -> Install Script (CMD) -> nuget sources add -Name NancyFX-CI -Source https://www.myget.org/F/nancyfx/

but still fails (see above error message).

What am I doing wrong, please?

  1. Support Staff 1 Posted by Feodor Fitsner on 21 Oct, 2014 06:31 PM

    Feodor Fitsner's Avatar

    It's simple! Running the following command shows us that feed does not contain specified version of Nancy package (and others requested too), so the error Unable to find version 'X of package 'Y' is absolutely correct:

    C:\Projects>nuget list -source https://www.myget.org/F/nancyfx -allversions -prerelease
    Nancy 0.24-Pre1447
    Nancy 0.24-Pre1448
    Nancy.Authentication.Basic 0.24-Pre1447
    Nancy.Authentication.Basic 0.24-Pre1448
    Nancy.Authentication.Forms 0.24-Pre1447
    Nancy.Authentication.Forms 0.24-Pre1448
    Nancy.Authentication.Stateless 0.24-Pre1447
    Nancy.Authentication.Stateless 0.24-Pre1448
    Nancy.Authentication.Token 0.24-Pre1447
    Nancy.Authentication.Token 0.24-Pre1448
    Nancy.Bootstrappers.Autofac 0.24.0-Pre131
    Nancy.Bootstrappers.Autofac 0.24.0-Pre132
    Nancy.Bootstrappers.Ninject 0.24-Pre133
    Nancy.Bootstrappers.Ninject 0.24-Pre134
    Nancy.Bootstrappers.StructureMap 0.24-Pre134
    Nancy.Bootstrappers.StructureMap 0.24-Pre135
    Nancy.Bootstrappers.Unity 0.24-Pre91
    Nancy.Bootstrappers.Unity 0.24-Pre92
    Nancy.Bootstrappers.Windsor 0.24-Pre131
    Nancy.Bootstrappers.Windsor 0.24-Pre132
    Nancy.Encryption.MachineKey 0.24-Pre1447
    Nancy.Encryption.MachineKey 0.24-Pre1448
    Nancy.Hosting.Aspnet 0.24-Pre1447
    Nancy.Hosting.Aspnet 0.24-Pre1448
    Nancy.Hosting.Self 0.24-Pre1447
    Nancy.Hosting.Self 0.24-Pre1448
    Nancy.Hosting.Wcf 0.24-Pre1447
    Nancy.Hosting.Wcf 0.24-Pre1448
    Nancy.Metadata.Modules 0.24-Pre1447
    Nancy.Metadata.Modules 0.24-Pre1448
    Nancy.Owin 0.24-Pre1447
    Nancy.Owin 0.24-Pre1448
    Nancy.Serialization.ProtoBuf 0.24-Pre126
    Nancy.Serialization.ProtoBuf 0.24-Pre127
    Nancy.Testing 0.24-Pre1447
    Nancy.Testing 0.24-Pre1448
    Nancy.Validation.DataAnnotations 0.24-Pre1447
    Nancy.Validation.DataAnnotations 0.24-Pre1448
    Nancy.Validation.FluentValidation 0.24-Pre1447
    Nancy.Validation.FluentValidation 0.24-Pre1448
    Nancy.Viewengines.DotLiquid 0.24-Pre1447
    Nancy.Viewengines.DotLiquid 0.24-Pre1448
    Nancy.Viewengines.Markdown 0.24-Pre1447
    Nancy.Viewengines.Markdown 0.24-Pre1448
    Nancy.Viewengines.Nustache 0.24-Pre1447
    Nancy.Viewengines.Nustache 0.24-Pre1448
    Nancy.Viewengines.Razor 0.24-Pre1447
    Nancy.Viewengines.Razor 0.24-Pre1448
    Nancy.Viewengines.Spark 0.24-Pre1447
    Nancy.Viewengines.Spark 0.24-Pre1448
    
  2. 2 Posted by Pure Krome on 21 Oct, 2014 09:05 PM

    Pure Krome's Avatar

    Ah - ok. So that answers one thing I assumed (incorrectly) about the public nancy myget feed.

    Lets just step back a tick to answer the question then.

    Q: If we wish to reference myget packages, all we need to do is have a nuget.config file (like the one I posted in the OP)? or do we still need to do something else (for appveyor) ?

  3. Support Staff 3 Posted by Feodor Fitsner on 21 Oct, 2014 09:14 PM

    Feodor Fitsner's Avatar

    nuget.config file as you showed above is fine. In fact, when you do nuget sources add command it does changes to a config under user profile.

  4. 4 Posted by Pure Krome on 01 Nov, 2014 12:08 AM

    Pure Krome's Avatar

    Thanks for the help Feodor - all good. Closing this now! Cheers!

  5. Pure Krome closed this discussion on 01 Nov, 2014 12:08 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM
20 Sep, 2024 05:50 PM