ASP.NET 코어 프로젝트가 net461을 대상으로하고 Azure 웹 사이트에서 실행할 수 있습니까?Azure에서 net461을 타겟팅하는 ASP.NET 코어
다음은 시도한 것과 실패한 것입니다.
는 나는 다음과 같은 오류 얻을netcoreapp1.0
을 대상으로하지만
net461
로 변경하는 경우 (컴파일 다른 필요한 변경을 포함) 할 때 작동
:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.Extensions.PlatformAbstractions.PlatformServices' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.Extensions.PlatformAbstractions.ApplicationEnvironment.GetApplicationBasePath()
at Microsoft.Extensions.PlatformAbstractions.ApplicationEnvironment..ctor()
at Microsoft.Extensions.PlatformAbstractions.PlatformServices..ctor()
at Microsoft.Extensions.PlatformAbstractions.PlatformServices..cctor()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildHostingServices()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at WebApplication1.Program.Main(String[] args) in C:\Users\a\WebApplication1\Program.cs:line 14
는 특히
System.IO.FileNotFoundException: Could not load file or assembly 'System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
는 로컬 그것을 잘 작동합니다 .
나는 필요한 어셈블리를 포함하도록 순진하게 누 그 패키지를 추가했습니다.
warn: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to bind to http://localhost:7762 on the IPv6 loopback interface.
System.AggregateException: One or more errors occurred. ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.Check(Int32 statusCode)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<>c.<StartAsync>b__6_0(Object state)
--- End of inner exception stack trace ---
내가 당장은 확실하지 않다 :
{
"dependencies": {
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Newtonsoft.Json": "9.0.1",
"System.AppContext": "4.1.0",
"System.Reflection.TypeExtensions": "4.1.0",
"System.Security.Cryptography.X509Certificates": "4.1.0"
},
은 결국 나는 오류의 다른 종류를 얻었다.
, 당신은 또한 사용할 수 있습니다 [쿠두 콘솔] (https://github.com/projectkudu/kudu/wiki/Kudu-console)/파일을 관리 . –