Reputation: 89
Hope anyone here can help. I've been on it for days.
I have VSO and am using service fabric. My builds always worked on VSO until a new developer installed the latest Service Fabric SDK on his machine. Being ok with using the latest SDKs I updated mine also. This didn't affect anything locally. But it's SF project is not building on VSO anymore.
This is the error:
ServiceFabricBackup\SocialHootz.Refs\SocialHootz.Refs.sfproj(0,0): Error MSB4057: The target "Package" does not exist in the project. Process 'msbuild.exe' exited with code '1'.
My gut feel is that the Hosted 2017 service on VSO doesn't use the latest version of MSBUILD but I'm at a loss at this stage.
Upvotes: 2
Views: 394
Reputation: 532
I recently ran across this issue. I have a Service Fabric build that failed with "Error MSB4057: The target "Package" does not exist in the project." I was in the process of moving the VSTS builds to 2017 Hosts. The problem turned out to be a ServiceFabricBackup folder that was created by some other operation. The creation of this folder and the wildcard on the build (**\*.sfproj) caused the build to try to build two service fabric projects. Removal of the ServiceFabricBackup folder fixed the issue. Equivalently, I could have specified the sfproj file in the build, as user3688632 did.
Note that there are other possible issues that generate this error: https://github.com/Azure/service-fabric-issues/issues/64
Upvotes: 1