2

I am trying to build a project that was created with MVC 4.0. There were errors with 'AllowAnonymous' attribute, because the build server did not have MVC 4.0 installed. So, I started installing MVC 4.0, but the setup prompted me to install Visual Studio 10.0 SP1 first, so I installed VS 10.0 SP1 and then installed MVC 4.0. The errors related to 'AllowAnonymous' attribute went away after the next build. But now I am getting an error which says - The target "_CopyBinDeployableAssemblies" does not exist in the project.I have tried a couple of solutions found on stack overflow that suggested

  1. Importing the project Microsoft.Application.Web.Targets and Microsoft.Web.Publishing.Targets.
  2. Install/Repair using the exe at http://go.microsoft.com/fwlink/?LinkId=253458.

But nothing has worked so far.

Please help me.

TVicky
  • 353
  • 3
  • 13
  • 36
  • Do you use TFS build the project? Which version of TFS do you use? If you build your project locally with MSBuild command line on your build agent machine, what result will you get? – Cece Dong - MSFT Feb 02 '18 at 07:03
  • Possible duplicate of [Why do I get the error "The target GatherAllFilesToPublish does not exist"?](https://stackoverflow.com/questions/10989051/why-do-i-get-the-error-the-target-gatherallfilestopublish-does-not-exist) – Liam Feb 20 '18 at 16:40

1 Answers1

2

I managed to resolve this error by adding an empty targets tag in the .csproj file for the project:

<Target Name="_CopyBinDeployableAssemblies"></Target>

Found this on stackoverflow itelf in the response to a similar question:

Why do I get the error "The target GatherAllFilesToPublish does not exist"?

TVicky
  • 353
  • 3
  • 13
  • 36