私はAsp.net 5 Webアプリケーションを持っています.Asp.net 5 Webアプリケーションは開発中に正常に動作します(Visual StudioまたはVSコードから問題なく起動できます)。ただし、アプリを正常に公開した後、「web.cmd」で Web サイトを起動しようとすると、次のエラーが表示され、Web サイトが読み込まれなくなります。
Application startup exception: System.IO.FileNotFoundException: Could not load file or assembly 'my-ng2-website' or one of its dependencies. The system cannot find the file specified.
File name: 'my-ng2-website' ---> 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)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.AspNet.Hosting.Startup.StartupLoader.FindStartupType(String startupAssemblyName, IList`1 diagnosticMessages)
at Microsoft.AspNet.Hosting.Internal.HostingEngine.EnsureStartup()
at Microsoft.AspNet.Hosting.Internal.HostingEngine.EnsureApplicationServices()
at Microsoft.AspNet.Hosting.Internal.HostingEngine.BuildApplication()
私は解決策を高低で検索しました。欠落している依存関係がわかりません。私はもう試した
package.lock.json の削除
dnu の復元
パブリッシュの設定は次のとおりです。
この茶葉を読める人はいますか?