XslCompiledTransform.Transform Invalid Arguments

I kept getting this mysterious error on only one of the TeamCity build agents. The application compiles fine everywhere else. error CS1502: The best overloaded method match for ‘System.Xml.Xsl.XslCompiledTransform.Transform(System.Xml.XmlReader, System.Xml.Xsl.XsltArgumentList, System.Xml.XmlWriter, System.Xml.XmlResolver)’ has some invalid arguments The last line throws the error: <p> <!--CRLF--> </p> <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">var xslt = <span style="color: #0000ff">new</span> XslCompiledTransform();</pre> <p> <!

NUnit Categories

Sometimes I want to only run a portion of my tests. nUnit allows tests to be labeled with Categories and then selectively choose which categories you want to run. I have found this especially helpful on TeamCity for integration tests because I don’t have all the infrastructure set up to successfully execute all of my tests. I have created a Category called “Always” and marked the tests that can run on TeamCity with this category.

varchar[(n)] – Default n is 30

I recently found a bug in a stored procedure which was truncating some string values. It turns out that they were being cast to varchar without n being specified. This resulted in them being cast to varchar(30) which was shorter than the input string.

SSRS ReportExecutionService and 401 Authorization Errors

I was calling the SSRS Web service from the same machine and suddenly started getting 401 Authorization Errors. I finally found the cause. Previously, I had been accessing the webservice with "localhost" in the URL, but at some point it got changed to the machine name. That’s when it stopped working. Apparently, a windows security feature called the "Lookback Check" causes this.

Custom Assemblies in SSRS 2008

Visual Studio can compile a report just fine, but then report that the report definition is invalid when you try to deploy. In addition to putting the custom assembly SSRS’s bin folder: C:Program FilesMicrosoft SQL ServerMSRS10_50.MSSQLSERVERReporting ServicesReportServerbin You have to put the assembly in VS’s private assemblies folder: C:Program Files (x86)Microsoft Visual Studio 2008Common7IDEPrivateAssemblies Otherwise you’ll get this completely worthless error message that tells you nothing about the problem. Also, keep in mind that VS seems to cache the assembly so if you make any changes to it, you have to reload VS.