-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Comments
In your project.json frameworks section, change: aspnet50 -> dnx451 |
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? |
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 |
Added using block around a disposable type usage
…ater 2.1.0 beta) due to fix #436
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:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
dnvm upgrade
dnu restore
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:The text was updated successfully, but these errors were encountered: