Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
Cobalt Website "BuildShadowTask" task fails unexpectedly
Ryan Morlok
When attempting to run the unit tests for Newsroom website, I get the following error as everything attempts to build:
Error 4 The "BuildShadowTask" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) Cobalt.Website.Newsroom.Web.UnitTests
This is also happening on the build server. Has anyone seen this error before and do you have any idea how to fix it?
Find more posts tagged with
news
refinitiv-internal
Accepted answers
Ryan Morlok
I was able to resolve the issue.
The problem was the unit tests project file had the following added to it:
however the reference accessor file was not checked in to TFS. I believe this relates to creating shadow accessors for testing private members.
I deleted the reference to the accessor from the project, rebuilt and everything work. I don't think we were actually using that feature, it was just accidentally added to the project.
The following blog post was useful in diagnosiing the problem:
[
http://au9ustine.wordpress.com/2011/03/05/buildshadowtask-failed-unexpectedly/][1]
[1]:
http://au9ustine.wordpress.com/2011/03/05/buildshadowtask-failed-unexpectedly/
All comments
Ryan Morlok
I was able to resolve the issue.
The problem was the unit tests project file had the following added to it:
however the reference accessor file was not checked in to TFS. I believe this relates to creating shadow accessors for testing private members.
I deleted the reference to the accessor from the project, rebuilt and everything work. I don't think we were actually using that feature, it was just accidentally added to the project.
The following blog post was useful in diagnosiing the problem:
[
http://au9ustine.wordpress.com/2011/03/05/buildshadowtask-failed-unexpectedly/][1]
[1]:
http://au9ustine.wordpress.com/2011/03/05/buildshadowtask-failed-unexpectedly/
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act