CreateAppHost task fails within Nano Server containers in 3.0
See original GitHub issueUsing SDK version 3.0.100-preview-009734
- Start with a
microsoft/nanoserver
container with dotnet 3.0 SDK installed (e.g.microsoft/dotnet-nightly:3.0-sdk
Dockerfile) - mkdir app
- cd app
- dotnet new
- dotnet build
Results:
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(142,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: The "CreateAppHost" task failed unexpectedly. [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: System.EntryPointNotFoundException: Unable to find an entry point named 'BeginUpdateResource' in DLL 'Kernel32'. [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResourceUpdater.Kernel32.BeginUpdateResource(String pFileName, Boolean bDeleteExistingResources) [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: at Microsoft.NET.Build.Tasks.AppHost.Create(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String intermediateAssembly, Logger log) in /_/src/Tasks/Microsoft.NET.Build.Tasks/AppHost.cs:line 82 [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore() in /_/src/Tasks/Microsoft.NET.Build.Tasks/CreateAppHost.cs:line 38 [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 35 [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\app\app.csproj]
C:\Program Files\dotnet\sdk\3.0.100-preview-009734\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(293,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\app\app.csproj]
Build FAILED.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
The CreateAppHost task failed unexpectedly. MSB4018
I was running the code inside shared directory, moving the folder out of shared directory and running the dotnet again solved the error....
Read more >The CreateAppHostTask failed unexpectedly
For a while now, I have been receiving an error “The “CreateAppHost” task failed unexpectedly. System.IO.IOException: The process cannot ...
Read more >What OS to target with .NET containers
NET Framework applications you have to target Windows Server Core, compatible with legacy apps and IIS, but it has a larger image. When ......
Read more >MSB4018: The task failed unexpectedly - Microsoft Q&A
Error MSB4018 The "CreateAppHost" task failed unexpectedly. System.AggregateException: One or more errors occurred. ---> System.
Read more >1e843f17a1ac273c62c13eb1ce9...
Details: 400 error, use a stronger password. Record your username and password to use to deploy your web apps. Create a resource group....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m hoping to have the fix in this week (ideally tomorrow). This is my priority issue atm.
@peterhuene - Is this something you know about?