Tag Archives: csharp

C# compiler error CS0182 when building via TeamCity

When running a build via TeamCity, I started to get the following exception: CSC error CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type The same code built fine in Visual Studio 2012, and nothing had changed on the build server so clearly something […]

Posted in Fixes | Also tagged , | 34 Responses

Getting a StyleCop SA0102 error with C# 4.0

I’m currently working on my first .NET 4.0 project at work. Whilst I’ve played with .NET 4.0 before, this is the first project where I’ve used it in conjunction with StyleCop. All was fine at first, then I suddenly started getting the following error when trying to build: SA0102: A syntax error has been discovered […]

Posted in Coding | Also tagged | Leave a comment