I got an answer from ESRI Technical Support (thanks Srishty). She said that the problem is a defect (#01599069). She also gave me the following workaround: First we change the build version from 10.0 and 10.2 in the config file. Then we right click the solution file and select "Unload Project" (third from the bottom). Then we click on "Edit<solution file>" (Second option) This opens the csproj/vbproj file, then we go at the very bottom of the csproj/vbproj file and replace "ESRI.ArcGIS.AddIns.targets" with "ESRI.ArcGIS.AddIns.11.targets". After we replace "SAVE" then Reload the Project. Project would probably need to get restart to reflect the changes made so close and reopen the solution file and build it again.
... View more