Is there an alternative to Microsoft Code Contracts static analysis? - visual-studio

I am very impressed with the Microsoft Code Contracts.
Unfortunately the static analysis is only available in Visual Studio 2008 Team System and Visual Studio 2010 Premium.
We are happily using Visual Studio 2008 Professional (without MSDN). Upgrading our Visual Studio license from pro to premium is way to expensive.
Is there a good alternative?

Take a look at the MSDN Ultimate Offer for Devs. It's not cheap, but it's a lot less expensive than 2008 Team Suite. Then you can use Visual Studio 2010 from now on with Code Contracts. :)
Also, Code Contracts is different from FxCop, where the latter is what everyone is going to think you're talking about when you say "static code analysis."

I personally use the following tools to help with my code analysis needs:
CodeIt.Right can be used as an analysis tool.
FxCop quite extensive and thorough and also free
CAT tool 1.1 is a simple tool to help identify security flaws in managed code.
Concerning code contracts, take a look at DevLabs portal and click on the "Projects" link to link you to the Code Contracts project available for Visual Studio 2008 and Visual Studio 2010

The compiler that comes with the platform SDK has static analysis for free.
cl /analyze. You can configure your IDE to use it.

Related

Does Visual Studio 2015 Community edition support Roslyn?

Can I use Roslyn and all its tooling in Visual Studio 2015 Community edition?
I am about to download the community edition and it's a big decision for me given that I have a single piece of hardware, my laptop, which I use for everything, and the only reason I am going to download 2015 is because I want to practice coding Roslyn, which is not available in the VS 2013 or earlier expression editions.
"Roslyn" is just the compiler platform in Visual Studio 2015. So yes, the Community edition has Roslyn.
We've been referring to it by its code name for so long that it's not really clear, but "Roslyn" is simply a rewrite of the C# and VB .NET compilers in managed code. On top of the compiler platform, you can write extensions to interact with code and the IDE as it's parsed in the form of quickfixes and refactorings.
The Visual Studio Community editions are nearly functionally identical to Visual Studio Professional, albeit under different license terms. This includes extension support.
The Roslyn GitHub page has awesome documentation to help you get your head wrapped around it.

Visual Studio 2013-TFS Testing

What kind of tests can be applied a program in Visual Studio 2013-TFS? I am new in testing field and my company uses TFS 2013. Can anyone suggest me some document or already applied tests document in TFS.
Thanks for supports in advanced
You can start with MSDN: Testing the application
You could read the e-book from the Microsoft patterns & practices team, Testing for Continuous Delivery with Visual Studio 2012 (http://msdn.microsoft.com/en-us/library/jj159345).
It gives a good introduction and understanding of how you can use visual studio and related tools to test software.
Even though it is written for 2012, almost everything still applies for TFS 2013.

Limitations of Visual Studio 2012 Express Desktop

I'm in the process of deciding whether or not to use Visual Studio 2012 Express for Desktop or purchase a retail copy of Visual Studio 2012 Professional for my desktop program. The program is built using C# though portions of it may include F#.
From what I've gathered so far, the express edition supports NuGet, Unit Testing, and Code Analysis. It mentions a subset of Code Analysis rules are used but I'm unsure how they compare to the professional edition as well as FxCop/StyleCop.
I'm assuming the express edition lacks extension support but the only extension I really cared about was NuGet. I also assume it doesn't include a TFS CAL despite having the ability to connect to TFS. This again isn't an issue as I'm using Perforce for source control. I also understand that this version is limited to desktop style applications only, but have so far only seen mention C++ and C#. Does it support F#?
Can someone clue me in as to any other limitations of 2012 Express for Desktop? Are there any license limitations for developing a commercial application?
In the past, MS included express editions as part of their version comparison. But when they updated their site for 2012, they separated out the express editions and offer little to no detail.
There are few limitation I can gather :
First of all there are different IDE's for different use
Visual Studio Express 2012 for Web.
Visual Studio Express 2012 for Windows 8
Visual Studio Express 2012 for Windows Desktop.
Visual Studio Team Foundation Server Express 2012
Express editions of the IDE omit the following features included in the Professional editions
Multi-unit testing framework and refactoring support
Static code analysis, profiling, and HLSL editing and debugging
Third-party extensibility support (though the Extension Manager feature is still present)
OpenMP support
But there are few positives I explore in 2012 :
Unlike previous version
Solution is allowed, you can create multiple projects in a single solutions.
64bit compilations support is there.
If working in single or less than 5 person team, express is the way to go.
It definitely bring much more new and unlock features than it predecessors.
As you receive a product key if you register I think it confirms that you then are free to use VS 2012 Express as you like.
http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express say:
"After installation, you can try this product for up to 30 days. You
must register to obtain a free product key for ongoing use after 30
days."
"Productivity Power Tools 2012" cannot be installed on VS2012 Express edition, hence such features like "Entity Framework Reverse Engineer Code First" won't be available, which is critical to migrate existing apps's DB into Model's classes.
Portable Class Libraries are not supported in express versions. (You can reference PCL dlls, you just can't work with PCL projects.)
F# is available for VS Express 2012 for Web
http://blogs.msdn.com/b/fsharpteam/archive/2012/09/12/announcing-the-release-of-f-tools-for-visual-studio-express-2012-for-web.aspx
Looks like NuGet worked with VS 2010 Express Web so I would expect it to work with 2012
http://docs.nuget.org/docs/start-here/nuget-faq
Professional gives you a lot of the profiling and static analysis tools. I couldn't find out how the FxCop rules differ.

using code contracts in visual studio 2010 professional

Actually in VS2010 professional edition, there was no code contracts. I had installed the standard version of code contracts.
Now in the Visual Studio 2010 > project properties > I get the code contracts tab.
My Question is if i have used the code contracts in my code, do i need to ship my project with any special dll or other thing so that the code contracts work after deployment.
Also, i am not currently planning to purchase the professional edition of code contracts. kindly explain me.
* Newly Added *
I would like to know whether using this mechanism will affect the use of Enterprise Library features like Unity & Exception logging. Also will this work for WCF, because if some new C#4.0 features are not supported in WCF.
I can't answer all of your questions but I can say that Code Contracts can be used in VS Professional edition but to get build-time checking to work in Visual Studio you will need VS Premium and up from what I understand.
Also if your interested I did put in a feature request to support Code Contracts in all editions of Visual Studio and I could use a little help adding some votes to it to get some attention from Microsoft.
Apparently they have the made the static checker available to all editions of Visual Studio in their 1.4.412128.0 release (December 28, 2011).
Check the release notes and you can download the latest msi here.
-Hope this helps

Does Visual Studio 2010 have tooling support for IronRuby?

I am interested in the following features: Code highlighting, Intellisense, Refactorings, Code navigation (Go to Definition etc.).
If this functionality is missing from Visual Studio 2010 maybe Microsoft is planning to add these features in the future or there are community project to develop IronRuby tooling add-in?
Good news! IronRuby Tools for Visual Studio 2010 were released on 21 OCT 2010 and are available here: http://ironruby.codeplex.com/releases/view/49097
Microsoft has recently released IronPython tools for Visual Studio and they are working on the same thing for IronRuby.
No planned release date yet but they are working on it.
no native support. not by microsoft directly
Ruby in Steel
This add-on to Visual Studio by SapphireSteel makes developing Ruby applications inside Visual Studio much more natural. It adds new Ruby project types, intellisense, code snippets, and syntax highlighting. But it costs money.
To clarify, SapphireSteel Software released a free IronRuby IDE way back in February 2008 - with code coloring, project management, build and run, visual form design etc. However, the IronRuby team was not overwhelmingly supportive of this project and we have now ceased development as explained here: http://www.sapphiresteel.com/Goodbye-IronRuby-Hello-Ruby-In
best wishes
Huw Collingbourne
SapphireSteel Software

Resources