How to integrate FxCop into Visual Studio 2005? - visual-studio

I use VS2005 but the version is not integrated to fxcop. Now I need to have some code metrics and the most proper is fxcop. How can I integrate VS with fxcop? Which version of fxcop do I need? What else should I take under consideration before I integrate fxcop?
Thanks,
Sun

As far as I know, the only way to do this is to run FxCop as an external tool. See here for details:
http://geekswithblogs.net/sdorman/archive/2007/02/18/106630.aspx
You should be able to use the latest version of FxCop, if you want to.

Related

.net core visual studio publish is including runtimes

I'm currently using a .net core visual studio publish, and its including the runtime dlls in the output. I do not want these files, but would like to use the hosting bundles on the server.
This is a new thing, it didn't use to include these dlls with a publish. I think it might have been triggered by a visual studio update, but I am not positive why its happening.
Here's my settings:
The Deployment Mode is not set to "Self-Contained" which I think is the setting that should force the runtime to be included.
I've done tons of googling but can't seem to find any other configuration that would be related to this. Any guidance would be greatly appreciated!
Posting an answer, just in case anyone else ends up here. I found the answer mostly because of Lex Li comment.
The most recent upgrade to visual studio / .net core seems to require you to specificity a target runtime in your Publish Profile. In order to make this work, you will be forced to upgrade your project to 2.1 or higher. Otherwise visual studio will choose portable by default, and include the runtime dlls in the publish.

How to debug a project file in MSBuild 14.0 / VS2015?

How to debug a project file in MSBuild 12.0 / VS2013? has an answer, but apparently that method is not supported in Visual Studio 2015/MSBuild 14. Does anyone know a way to perform MSBuild debugging in Visual Studio 2015/MSBuild 14? Bonus points for scoop about Visual Studio 2017.
The MSBuild debugger was never officially supported and was cut from MSBuild in favor of cross-platform support in the VS 2015/MSBuild 14 timeframe.
There are many ways to debug the behavior of a build. The combination of a Verbosity=Diagnostic build log and the preprocessed project (msbuild /pp:preprocessed.xml path\to\the.csproj creates a file containing all of the build logic for a given project) is extremely powerful. You may also be interested in the UI that the MSBuildStructuredLog provides, which helps pare down the massive output produced by a diagnostic log.
It really works well in old VS version:
But if I use the VS2015, I got the same issue as yours, it could recognize the /debug command line.
I report this issue to the product team here:
https://connect.microsoft.com/VisualStudio/feedbackdetail/view/3120913/how-to-debug-a-project-file-in-msbuild-14-0-vs2015
You could check the latest update from it, of course, please also vote and add your comment there:)

VS2012 professional Code Coverage

I´m searching for a way to generate code coverage reports on VS2012 professional and using Nunit. I know that VS2012 ultimate have a code coverage tool and with Nunit_Adapter you can generate the code coverage report, but the issue is that I am using VS2012 professional and does not have the option to generate the code coverage report.
Does someone knows a plug-in or a relative simple way to creates this reports on VS2012 professional?
Thanks,
P.S And if someone knows a way to creates this reports using Nunit framework on VS2010 it could be an option.
Or if you want free (opensource) you can try OpenCover which is available as a nuget package and use ReportGenerator to generate some nice reports.
You'll need a third party code coverage tool, such as NCover or dotCover.

Planning to upgrade VS 2005 to VS 2010

I have installed VS 2010 and want to migrate all code written in VS 2005 to VS 2010.
Please note that we do not have VS 2008, all code are in C# 2.0 and Asp.net 2.0 only.
Can anyone please tell me now what all points need to be considered while migrating.
Update:
I have set target framework to 2.0 for all of my Libraries and web projects. It complies without any error!
However, when site opens in IE (Set to default.aspx), it gives me error as below:
InternalXmlHelper.vb(9) : error BC30560: 'ExtensionAttribute' is
ambiguous in the namespace 'System.Runtime.CompilerServices'.
<Global.System.Runtime.CompilerServices.ExtensionAttribute()> _
Keep all the target framework settings to .NET 2.0. This way, there should be no compilation problem at all.
The changes that you should see are the solution and project files only.
Start with known good solutions in source control (and label—you shouldn't need to go back, but easy to add an extra safety net).
Open each solution in VS2010, allow the conversion wizard to do the conversion.
Resolve any issues.
Honestly, if you're just upgrading VS 2010 you don't really need to consider much. Just keep backups (any real SCM product will do) and you're good. You don't have to upgrade your applications' runtime targets at all if you don't want to.
If you're building with CAS policy, you might run into issues with using MSBuild 4.0 to build you 2.0 applications. If you don't know what I'm talking about, never mind.
My advice is to make sure everyone's "checked in" to your source code provider, and run the conversion wizard and see how it goes.

About an "Auto-build" System

I have some projects which I wrote in C++ and compile with Visual Studio 2005. I'm using SVN for source control. Could you recommend an auto-build system to compile my code?
Cruisecontrol or Cruisecontrol.net are both good for this kind of task. You can use them either alone or in partnership with a build (not autobuild) tool e.g. ant or nant.
(They are both free).
Don't be put off by their java or .net basis, either will happily allow you to build visual studio c++ from svn.
see
http://cruisecontrol.sourceforge.net/
http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET
FinalBuilder is second to none, check it: http://www.finalbuilder.com/

Resources