Visual Studio Error On Publish : The target “GatherAllFilesToPublish” does not exist in the project

How to fix The target “GatherAllFilesToPublish” does not exist in the project error   When we upgrade the visual studio and try to publish a project which created from an old visual studio version, we get an error something like “The target “GatherAllFilesToPublish” does not exist in the project”. The reason seems to be the project…