2016-01-09 5 views
5

Sto leggendo il seguente errore dal file di log in Kudo sui siti web azzurre:Impossibile caricare l'applicazione o il comando eseguire 'Microsoft.AspNet.Server.Kestrel' con 1.0.0-rc1-update1

Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web. 
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) 
    at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence) 
    at System.Reflection.Assembly.LoadFile(String path) 
    at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadFile(String assemblyPath) 
    at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext loadContext) 
    at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName) 
    at Microsoft.Dnx.Host.LoaderContainer.Load(AssemblyName assemblyName) 
    at Microsoft.Dnx.Host.DefaultLoadContext.LoadAssembly(AssemblyName assemblyName) 
    at Microsoft.Dnx.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory) 
    at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadAssemblyImpl(AssemblyName assemblyName) 
    at Microsoft.Dnx.Runtime.Loader.LoadContext.ResolveAssembly(Object sender, ResolveEventArgs args) 
    at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName) 

posso eseguire il mio sito in locale:

C:\dev\ammo\ascend-ammo-wildlife>dnx web 
Hosting environment: Production 
Now listening on: http://localhost:5000 
Application started. Press Ctrl+C to shut down. 

project.json si presenta come segue e utilizzando 1.0.0-rc1-update1

{ 
    "webroot": "wwwroot", 
    "version": "1.0.0-*", 
    "compilationOptions": { 
    "emitEntryPoint": true 
    }, 

    "dependencies": { 
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", 
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", 
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", 
    "Microsoft.Extensions.Logging": "1.0.0-rc1-final", 
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", 
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final" 
    }, 

    "commands": { 
    "web": "Microsoft.AspNet.Server.Kestrel" 
    }, 

    "frameworks": { 
    "dnx451": { }, 
    "dnxcore50": { } 
    }, 

    "exclude": [ 
    "artifacts", 
    "wwwroot", 
    "node_modules", 
    "bower_components" 
    ], 
    "publishExclude": [ 
    "**.user", 
    "**.vspscc" 
    ] 
} 

Can SOM eone mi indica le direzioni delle cose per verificare per capire perché non ci riesce.

risposta

5

Copia il file uno a uno dal mio progetto a un progetto vuoto funzionante sono stato in grado di capire qual era il problema.

La presenza di un global.json nel progetto era il problema.

Si dovrebbe anche notare che il mio progetto sturcture simile a questa per i progetti di frontend:

/ 
/wwwroot/ 
/src/ //Typescript files compiles into wwwroot 
/typings/ //tsd typings 
/global.json //This was the one that caused the issue, after deleting everything worked 
/tsd.json 
/tsconfig.json 
/startup.cs 
/project.json 
/package.json 
/gruntfile.js 
/bower.json 
/project.xproj 
/project.sln 

dove normale vs progetti tipico avere la cartella soluzione madre in cui si trova il file global.json

+1

Grazie, questo mi stava facendo impazzire! –

Problemi correlati