Skip to content

Running web samples: "Failed to resolve the following dependencies for target framework..." #436

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

Closed
SteveArr opened this issue Apr 3, 2015 · 3 comments

Comments

@SteveArr
Copy link

SteveArr commented Apr 3, 2015

Issue:

Following the README instructions to run the samples with DNVM and DNX results in the following error:

System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1':
Kestrel 1.0.0-beta3
Microsoft.AspNet.Diagnostics 1.0.0-beta3
Microsoft.AspNet.Hosting 1.0.0-beta3
Microsoft.AspNet.Server.WebListener 1.0.0-beta3
Microsoft.AspNet.StaticFiles 1.0.0-beta3

Searched Locations:
C:\Users\steve\Documents\GitHub\Home\samples{name}\project.json
C:\Users\steve.dnx\packages{name}{version}{name}.nuspec
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1{name}.dll
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\Facades{name}.dll
C:\Windows\Microsoft.NET\assembly\GAC_32{name}{version}{name}.dll
C:\Windows\Microsoft.NET\assembly\GAC_64{name}{version}{name}.dll
C:\Windows\Microsoft.NET\assembly\GAC_MSIL{name}{version}{name}.dll

Try running 'dnu restore'.

at Microsoft.Framework.Runtime.DefaultHost.GetEntryPoint(String applicationName)
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args)
at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
at dnx.host.Bootstrapper.RunAsync(List`1 args)
at dnx.host.RuntimeBootstrapper.ExecuteAsync(String[] args)
at dnx.host.RuntimeBootstrapper.Execute(String[] args)

Recreate steps:

  1. Instantiate a fresh Azure Visual Studio Ultimate 2015 CTP 6 instance.
  2. Connect via RDP.
  3. Open CMD
  4. Run: @powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
  5. Run: dnvm upgrade
  6. Install Git Hub for Windows, fork & clone https://github.com/aspnet/Home
  7. In CMD, change to samples/HelloMVC or samples/HellowWeb
  8. Run: dnu restore
  9. Run: dnx . web

Environment:

Azure Visual Studio Ultimate 2015 CTP 6 instance
Windows Server 2012 R2
.Net Framework release 393326 (per registry)

Details:

I can run the ConsoleApp. I cannot run HelloWeb or HelloMVC, both return the same error.

After getting the error, I ran set DNX_TRACE=1 to provide more details for the following screenshot:

reference

@davidfowl
Copy link
Member

In your project.json frameworks section, change:

aspnet50 -> dnx451
aspnetcore50 -> dnxcore50

@SteveArr
Copy link
Author

SteveArr commented Apr 3, 2015

After making the suggested changes I encountered new exceptions (Could not load file or assembly 'IConfiguration').

I did further research and determined that I had cloned the master branch and not dev. Dev worked as documented.

Should the README be updated?

@rawberg
Copy link

rawberg commented May 8, 2015

ran into this same issue. after making the change suggested by @davidfowl I get the same IConfiguration error message as @SteveArr. I'm on OSX (10.10.3), dnx (1.0.0-beta4-11566) dnvm (1.0.0-beta5-10375). Same issue as #310

natemcmaster pushed a commit that referenced this issue Nov 14, 2018
natemcmaster pushed a commit that referenced this issue Nov 14, 2018
Added using block around a disposable type usage
ryanbrandenburg pushed a commit that referenced this issue Nov 19, 2018
ryanbrandenburg pushed a commit that referenced this issue Nov 20, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants