How to troubleshoot pivot errors in Code Analysis of an MVC.net project using Team City

When using Team City to generate CI, it is possible to use the Resharper command line tools to perform code review of the code as one of the build steps.

I have reference library projects working, but the mvc.net project in the solution fails with reference errors:

One or more of the types required to compile the dynamic expression could not be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?

Even with Microsoft's default template, there are over 200 bugs and they all seem to come from razor views. (The project compiles and deploys from the build server correctly, and FXCop also starts successfully, this seems to be a resharper-only tool problem.)

I can run the override code validation in visual studio without error.

In Team City, I just have the default Inspect add-on (.NET) pointing to the .sln file.

We are using the command line tools Resharper 9.1.201 as provided in TeamCity 9.0.4

What configuration or additional steps can I take to get the command line tool resharper to resolve mvc view links on the build server?

If link resolution is not possible, is it possible to exclude razor views from analysis without having to add each exclusion to the command line?

+3


source to share


1 answer


In the future, I had the same problem. Digging through the build log, I noticed that the apparently unrelated warning is:

No referenced assemblies found for ".NETFramework, Version = v4.5.2".



I migrated my project to .NET 4.6 and installed the .NET 4.6 targeting package and the code validation errors disappeared. Unfortunately, I don't know if installing the .NET 4.5.2 targeting package would have allowed.

0


source







All Articles