Last post Jul 09, 2014 01:48 AM by Starain chen - MSFT
Jul 07, 2014 10:32 PM|mchlSync|LINK
The new MVC project in VS 2012 couldn't even pass the code analysis. I don't even write anything..
CA0058 Error Running Code Analysis CA0058 : The referenced assembly 'System.Net.Http, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be found. This assembly is required for analysis and was referenced by: c:\users\misy\documents\visual
studio 2012\Projects\Sample.WebApi\Sample.WebApi\bin\Sample.WebApi.dll, c:\users\misy\documents\visual studio 2012\Projects\Sample.WebApi\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll. [Errors and Warnings] (Global)
CA0052 Error Running Code Analysis CA0052 : No targets were selected. [Errors and Warnings] (Global)
CA0055 Error Running Code Analysis CA0055 : Could not load c:\users\misy\documents\visual studio 2012\Projects\Sample.WebApi\Sample.WebApi\bin\Sample.WebApi.dll. The following error was encountered while reading module 'System.Web.Http': Assembly reference
cannot be resolved: System.Net.Http, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. [Errors and Warnings] (Global)
Yes. I know how to fix "Tip: FxCop issue with System.Net.Http". I posted it a while. No matter how many update we got for VS, this issue is still there.
There are more issues with FxCop/Code Analysis...
(Note: Those links are to my blog posts but I don't intent to drive the traffic from here. I believe the tile explains what the error is about. You don't have to click and check my post unless you want to see the screenshots, steps and etc.)
Come on, Microsoft! FxCop or Code Analysis are recommended by Microsoft (or probably Visual Studio team) for developers to use to check whether the code are met with best practice and etc. I believe that there are some teams that don't care what other team
recommend even both of them are in Microsoft. If Microsoft is going for One-Microsoft then it's important that all teams inside Microsoft should be in-sync. Yes, it's hard to do in big company but it's NOT impossible.
Does MVC team consider "FxCop/CodeAnalysis" as a outdated/obsoleted tool? If yes then I don't mind changing to something else. What tool does MVC team (or One-Micrsofot) recommend?
Jul 09, 2014 01:48 AM|Starain chen - MSFT|LINK
Is it a MVC project? According to your description, it seems the Web API project.
Base on my test in a new MVC 4 project, I got some issue (They are different from you mentioned)
You could submit this feedback to Microsoft Connect feedback portal:
http://connect.microsoft.com, Microsoft engineers will evaluate them seriously. Thanks for your understanding. After you submit the feedback, you can post the link here which will be beneficial for other members with the similar issue.