0
votes

I read the following both articticles about the using of portable class library(PCL) in application design:

http://www.dotnetcurry.com/showarticle.aspx?ID=843 and http://blogs.msdn.com/b/dsplaisted/archive/2012/08/27/how-to-make-portable-class-libraries-work-for-you.aspx

I created an PCL and a unit test project to test the PCL. I build everything with my visual studio 2012 and it works great, i was also able to start my application using this PCL.

I use a TFS for source controll and nightly tests. If i try to build the the unit test project or my apllication via TFS i retrieve two errors:

CA0055 : * Could not load file: 'C:...\MyPCL.dll'. CA0052 : No targets were selected.

The PCL use .Net Framework 4.5 and .Net for Windows Store apps as targets and all projects which are no PCL are configured to use .Net Framework 4.5. I does not use any other reference as the default ".Net Protable Subset" reference.

If i check the build server there is a compiled and working version of my PCL. If i disable the code analysis while building there are no errors and all unit test works fine.

But it is no solution for me to disbale the code analysis. So has anybody an idea why it crashed and how to get it working with code analyse?

2
Try building a local version with "msbuild /property:RunCodeAnalysis=true SolutionName.sln" - JamesF

2 Answers

1
votes

I ran into the same problem after renaming the project. Check the AssemblyInfo.cs file, make sure the assemblyTitle is correct. Better to have it same as the project name, and is not conflicting with any other projects

0
votes

Is your local build working fine when code analysis is enabled in Visual Studio?

If yes then one of the possible reason for this issue can be build output path in TFS Build. In local builds, output files are generated in bin directory of respective projects where as in TFS Build all the project output files are copied in binaries directory.