microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 399 forks source link

EmbedAppNameInHost build process step breaking everything. #684

Open ejlevin1 opened 6 years ago

ejlevin1 commented 6 years ago

I keep getting this error randomly: The "EmbedAppNameInHost" task failed unexpectedly and it subsequently makes the Service project not build at all. It's odd because I thought that it was when I would a second ASP.NET Core Service, but then I was able to reproduce it on a brand new solution/project with the first service. I'm running VS2017 in Admin mode. Attached is the build log error. I also took a video of the issue happening that you can find link here:

I'd love to get going with ServiceFabric. I actually had a stateless ASP.NET Core Webapp running; however, started getting this the first time when I added the next stateful service. Would using a different IDE help temporarily? Sadly, I'm thinking of just doing an Azure WebApp given this.

build.log

vipul-modi commented 5 years ago

@MikkelHegn @raunakpandya - can you please follow up?

mikkelhegn commented 5 years ago

@dbreshears and @wli3 if they have any idea why the .net target cannot acces the file.

From the logs:

1>C:\Program Files\dotnet\sdk\2.1.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(306,5): error MSB4018: The "EmbedAppNameInHost" task failed unexpectedly. 1>C:\Program Files\dotnet\sdk\2.1.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(306,5): error MSB4018: System.UnauthorizedAccessException: Access to the path 'C:\Users\ejlevin1\Documents\Visual Studio 2017\Projects\ServiceFabricTest\SmartHostWeb\obj\netcoreapp2.1\win7-x64\host\SmartHostWeb.exe' is denied.

dbreshears commented 5 years ago

No immediate idea. Trying to repro based on your video but no luck. @ejlevin1 Do you also hit this on F5 or when building the solution or via the SmartHost SFApp project? Do you also hit this with just a new .NET Core 2.1 app outside of the Service Fabric solution?