TFS Error: MSB4018 The “BuildShadowTask” task failed unexpectedly

There seams to be a problem in MSBuild when you add an “Accessor” as part of a Unit Test project.

 

An Accessor allows your test project to access code that would normally be “Private” or “Friend” from outside the Assembly that it resides in.

image

It creates a little file with the “.accessor” extension that is the same name as your DLL, and contains the name of the DLL.

image

If you remove this file then your remote MSBuild server will then build you solution successfully again including running your Unit Tests.

 

Reference:

Re: BuildShadowTask Failed unexpectedly – Accessor Problem (Upconvert VS 2005 to 2008) – URGENT

BuildShadowTask Failed unexpectedly – Accessor Problem (Upconvert VS 2005 to 2008) – URGENT

 

Technorati Tags:     
  • Bryan

    This did indeed fix my problem. I’m using TeamCity, but the problem was the same. Thanks a ton! At first, I passed by this blog entry because I found it hard to believe the solution was so simple. Glad I came back after a little time of walking around and pondering.

  • Nripin Babu

    Work Like a charm dude

  • simon burgoyne

    Just, thanks for the explanation, I was wondering what the accessor was….

  • Hi Martin. Thanks for the post.

  • Anonymous

    This helped, many thanks! It’s always nice when someone else goes through some pain and posts about it so others like myself don’t have to suffer.

  • Pingback: » Updating C++ project to VS2012 Correlation does not imply causation()

  • Pingback: CDNIC | Updating C++ project to VS2012()