Reputation: 148
I'm trying to deploy an ASP NET 5 Web App on IIS but there´s no way to make it works, it gives me the following error:
Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1': ....(a list with all the dependencies of my project)
It seems thats is unable to resolve the path to the dependencies, but if I check on 'approot' folder they are all there. My 'project.json' is this:
"dependencies": {
"EntityFramework": "7.0.0-beta4",
"EntityFramework.Commands": "7.0.0-beta4",
"EntityFramework.Core": "7.0.0-beta4",
"EntityFramework.SqlServer": "7.0.0-beta4",
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Newtonsoft.Json": "7.0.1",
"System.Xml.XmlDocument": "4.0.0-beta-22816"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": { }
}
Also the paths from web.config in 'wwwroot' folder seems to be ok:
<appSettings>
<add key="bootstrapper-version" value="1.0.0-beta4" />
<add key="runtime-path" value="..\approot\packages" />
<add key="dnx-version" value="1.0.0-beta4" />
<add key="dnx-clr" value="clr" />
<add key="dnx-app-base" value="..\approot\src\Astarte" />
</appSettings>
I'm really stucked, ¿any idea of what could be the problem?
Upvotes: 1
Views: 228
Reputation: 265
You may need to specify the version of the sdk you require (in your case 1.0.0-beta4). Try adding a global.json file in your appication root with the following:
{
"sdk": { "version": "1.0.0-beta4" }
}
*On a side note, as @Henk Mollema has said you should probably upgrade at some point to a more recent beta, as beta4 is now quite old. Please beware however that this will cause breaking changes so you may want to tackle this separately!
Upvotes: 1