devAdvantage  devAdvantage

Analyzing your First Solution with devAdvantage

Analyzing your First Solution with devAdvantage

This is a walkthrough to show you how you can quickly analyze your first solution. You can choose to do this on the sample project we provide or use your own C# solution. You must have devAdvantage installed to go through this walkthrough.  To install or verify your installation, please see Installation and Configuration.

Walkthrough using sample solution

  1. Copy sample project files into your local folder.
  2. Open up Visual Studio® .NET through the Start menu
  3. Open the C# sample solution provided by going to File menu and "Open Solution..." menu item.  The sample solution, called "MarketWatch.sln ",  is located in the folder where you copied it.


  4. Once the solution is open, select devAdvantage menu, Analyze Solution menu item. 




  5. The Analyze Solution action will kick-off the analysis of the complete solution which will result in output to the Visual Studio® .NET Output window and end with the Analysis Results window showing what violations have been found. 




  6. The sample solution will generate four violations which occur in the sample project.  You can double click on any of the violations to go to the section of code that contains the violation.  Right clicking on the violation and choosing the menu item Go To violation will have the same effect.




  7. To understand more about why the code violates the rule you can select the violation, right click and choose the Explain violation menu item.  This will open up a help topic which explains what the rule and violation is and what a proper solution to the problem is.

  8. To automatically fix one or more of the violations you can mark one or more violations in the table and right click for the menu.  Select the Fix violation(s) menu item and devAdvantage will automatically make the code changes for you.

  9. Once violations are fixed, they will be placed at the end of the Analysis Results table with a strike through the violation.  You can review the changes that were made by double-clicking the item or using the Go To violation menu item.  You can use the Edit menu,  Undo menu item to undo any changes that may have been made if needed.

 

Analysis using your own solution

The steps for analyzing your own solutions are very similar to the walkthrough above.  When analyzing your own solution, you may find different analysis results or have no violations at all.

See Also