2

I have an very simple ASP.NET vNext just wanted to be a static file server. I had used kvm upgrade to install the latest version and below is my project.json.

{
    "dependencies": {
        "Helios" : "0.1-alpha-*",
        "Microsoft.AspNet.FileSystems": "0.1-alpha-*",
        "Microsoft.AspNet.Http": "0.1-alpha-*",
        "Microsoft.AspNet.StaticFiles": ""
    },
    "commands": {
        "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:22222"
    },
    "configurations" : {
        "net45" : {
        },
        "k10" : {
            "System.Diagnostics.Contracts": "4.0.0.0",
            "System.Security.Claims" :  "0.1-alpha-*"
        }
    }
}

And below is my Startup.cs

using System;
using Microsoft.AspNet.Builder;

namespace WebApplication3
{
    public class Startup
    {
        public void Configure(IBuilder app)
        {
            app.UseStaticFiles();
        }
    }
}

Then when I ran kpm restore I got the error said

Unable to locate Microsoft.AspNet.StaticFiles >= 0.1-alpha-build-0402
Unable to locate Microsoft.AspNet.Diagnostics >= 0.1-alpha-build-0623
Unable to locate Microsoft.AspNet.Hosting >= 0.1-alpha-build-0519
Unable to locate Microsoft.AspNet.Server.WebListener >= 0.1-alpha-build-0469

Below is the result of kvm list.

Active Version              Runtime Architecture Location
------ -------              ------- ------------ --------
       0.1-alpha-build-0421 svr50   x86          C:\Users\me\.kre\packages
       0.1-alpha-build-0472 svr50   x64          C:\Users\me\.kre\packages
       0.1-alpha-build-0472 svr50   x86          C:\Users\me\.kre\packages
  *    0.1-alpha-build-0496 svr50   x86          C:\Users\me\.kre\packages

I think I have 0.1-alpha-* installed but why kpm restore told me cannot find.

2
  • 1
    Do you have the AspNet vNext MyGet feed (github.com/aspnet/Home/blob/master/NuGet.Config#L4) configured? Commented Jun 9, 2014 at 18:29
  • Worked! I need to put this NuGet.config into the parent folder of my website. Please move this to answer so that I can mark, thanks. Commented Jun 10, 2014 at 2:19

2 Answers 2

3

Do you have the AspNet vNext MyGet feed (github.com/aspnet/Home/blob/master/NuGet.Config#L4) configured?

Sign up to request clarification or add additional context in comments.

Comments

1

Try adding a version to the StaticFiles dependency

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.