Quantcast
Channel: MSBuild Extension Pack
Viewing all articles
Browse latest Browse all 1211

Commented Issue: StyleCop NullReferenceException [10094]

$
0
0
MSBuild Extension Pack November 2011 & StyleCop 4.6

We have problems with a NullReferenceException on line 227 in StyleCop.cs.
We do not know the reason.

Fix:
foreach (ITaskItem i in this.FailedFiles)
{
if (i != null)
{
streamWriter.WriteLine(i.ItemSpec + " (" + i.GetMetadata("CheckId") + ": " + i.GetMetadata("Message") + " Line: " + i.GetMetadata("LineNumber") + ")");
}
}
Comments: ** Comment from web user: RicardoGer **

This error is not truly deterministic reproducible.
Sometimes it happens, sometimes not.

MSBuild Log:
(StyleCopAnalyse target) -> error : NullReferenceException: Object reference not set to an instance of an object.

Then i tried with "LogExceptionStack="true"" and see the position.



Viewing all articles
Browse latest Browse all 1211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>