rfennell/StyleCopCmdLine

Strange error during build

Closed this issue · 3 comments

Hi @rfennell

We set up StyleCopCmdLine as referred in your blog. If we run it from build vNext, we get some strange security errors. If it is run from commandline outside the build process (but on same machine) it is running as expected. Do you know what could cause this error?

Log:
2015-08-20T13:45:39.1626774Z ##[error]Exception calling "Scan" with "0" argument(s): "Inheritance security rules violated by type:
2015-08-20T13:45:39.1626774Z ##[error]'Syncfusion.Maps.MVVM.MapControlCommandBase`1'. Derived types must either match the security accessibility
2015-08-20T13:45:39.1626774Z ##[error]of the base type or be less accessible."
2015-08-20T13:45:39.1626774Z ##[error]At C:\Build\A1_work\e93f1922\S_006\Build\RunStyleCop.ps1:97 char:4
2015-08-20T13:45:39.1626774Z ##[error]+ $scanner.Scan()
2015-08-20T13:45:39.1794882Z ##[error]+ ~~~~~~~~~~~~~~~
2015-08-20T13:45:39.1794882Z ##[error] + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
2015-08-20T13:45:39.1794882Z ##[error] + FullyQualifiedErrorId : TypeLoadException

Thank you for your feedback.

Marc

is the build running interactive on the desktop or as a service? Also is UAC enabled on the build machine?

I have seen problems where the vNext build agent was run from a command prompt once normally and once 'as administrator'. All the _work folder get confused rights. Deleting the _work folder addresses the problem.

We have seen this as for Windows 8 unit tests you have to have UAC enabled just right.

Thanks for your quick reply. We are running the build agent as a windows service with standard UAC. To you think disabling UAC will prevent this error? Or what do you recommend?

I would try running as an interactive session as a test, see if you get the same issue, This was how I did all the testing. So it might be a bug when running as a service.

The UAC issue seems to appear when you change UAC settings between builds, but it does not sound as if you are doing that.

I am mean to be putting in our new production vNext build system this week so will see if I get the same issues, though I would say we were planning to run all our build agents interactive as we need them that way for Windows 8 unit testing