Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The CreateAppHost task failed unexpectedly. MSB4018

When I try and build my ASP.NET Core project, I continue to get this error message in Visual Studio 2019. When I build it the second time, the error disappears.

Does anyone know what this error means and how to get rid of it?

Thanks!

<CreateAppHost AppHostSourcePath="$(AppHostSourcePath)"
                   AppHostDestinationPath="$(AppHostIntermediatePath)"
                   AppBinaryName="$(AssemblyName)$(TargetExt)"
                   IntermediateAssembly="@(IntermediateAssembly->'%(FullPath)')"
                   WindowsGraphicalUserInterface="$(_UseWindowsGraphicalUserInterface)"
                   Retries="$(CopyRetryCount)"
                   RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
                   />

enter image description here

like image 685
roonz11 Avatar asked Apr 06 '20 19:04

roonz11


1 Answers

Try running visual studio using 'as administrator' option.

enter image description here

Some of the files which required for complete building may need admin privilege for accessing them. Commonly run Visual Studio has not enough rights to access them

like image 139
simply good Avatar answered Sep 18 '22 12:09

simply good