c# - dotnet new project can't restore it's dependencies -


i wanted create web app using mvc6 , searched asp.net 5 preview templates in asp.net web application(.net framework) couldn't find , searched further more in google. of solutions said install asp.net core preview templates , somehow got installing asp.net core. creating new project below.

enter image description here

enter image description here

after step creating new project me, these things happening new project.

enter image description here

to dependencies have in project getting similar error this:

nu1002 dependency system.runtime.handles 4.0.1 not support framework .netcoreapp,version=v1.0.

here project.json

project.json {   "dependencies": {     "microsoft.netcore.app": {       "version": "1.0.0",       "type": "platform"     },     "microsoft.aspnetcore.diagnostics": "1.0.0",      "microsoft.aspnetcore.server.iisintegration": "1.0.0",     "microsoft.aspnetcore.server.kestrel": "1.0.0",     "microsoft.extensions.logging.console": "1.0.0"   },    "tools": {     "microsoft.aspnetcore.server.iisintegration.tools": "1.0.0-preview2-final"   },    "frameworks": {     "netcoreapp1.0": {       "imports": [         "dotnet5.6",         "portable-net45+win8"       ]     }   },    "buildoptions": {     "emitentrypoint": true,     "preservecompilationcontext": true   },    "runtimeoptions": {     "configproperties": {       "system.gc.server": true     }   },    "publishoptions": {     "include": [       "wwwroot",       "web.config"     ]   },    "scripts": {     "postpublish": [ "dotnet publish-iis --publish-folder %publish:outputpath% --framework %publish:fulltargetframework%" ]   } 

and nuget.config(c:\users\charitha\appdata\roaming\nuget):

<configuration>   <packagesources>    <add key="dotnet.cli" value="https://dotnet.myget.org/f/dotnet-cli/api/v3/index.json" />     <add key="dotnet.core" value="https://dotnet.myget.org/f/dotnet-core/api/v3/index.json" />     <add key="rc2" value="https://www.myget.org/f/aspnetvnext/api/v3/index.json" />     <add key="aspnetci" value="https://www.myget.org/f/aspnetcirelease/api/v3/index.json" />     <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolversion="3" />     <add key="nuget.org" value="https://www.nuget.org/api/v2/" />   </packagesources> </configuration> 

i have aleady installed

  • .net core tools visual studio
  • dotnetcore.1.0.0-vs2015tools.preview2

any appreciated. thanks

since pointing released versions of packages, nuget.config should below:

<?xml version="1.0" encoding="utf-8"?> <configuration>   <packagesources>     <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolversion="3" />   </packagesources> </configuration> 

if not want change nuget.config file content globally, can create nuget.config file local application , make sure add <clear /> first element under <packagesources> node discard inherited sources.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -