Azure / azure-iot-protocol-gateway

Azure IoT protocol gateway enables protocol translation for Azure IoT Hub
Other
226 stars 151 forks source link

Solution fails to compile - "GetApplicationParametersFiles" task failed #162

Open wickste opened 3 years ago

wickste commented 3 years ago

Repro steps: 1) clone the repo 2) open ProtocolGateway.sln in Visual Studio 2019 (latest version & updates) 3) build solution

Result - project 'ProtocolGateway.Host.FabricSetup.CounterSetup' fails to compile

Error   MSB4018 The "GetApplicationParametersFiles" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'C:\Users\wicks\source\repos\new\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Fabric\PublishProfiles\Local.5Node.xml'.
File name: 'C:\Users\wicks\source\repos\new\azure-iot-protocol-gateway\host\ProtocolGateway.Host.Fabric\PublishProfiles\Local.5Node.xml'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Microsoft.VisualStudio.Azure.Fabric.FileSystem.FileOpenRead(String path)
   at Microsoft.VisualStudio.Azure.Fabric.BuildTasks.GetApplicationParametersFiles.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() ProtocolGateway.Host.Fabric C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VisualStudio\v16.0\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets    115

Issue looks related to this closed issue from a few years back: https://github.com/microsoft/service-fabric-issues/issues/482

RakeLund commented 2 years ago

Did you figure out what was wrong and how to fix it? I get the same result.

wickste commented 2 years ago

@RakeLund no I didn't. @nayato for ideas or comments on this issue.

RakeLund commented 2 years ago

The problem was long paths.. Cloned to an empty folder on C:/, and it build fine :)