Summary: This document provides information about the extension providing support for the analysis of XAML files originating in Xamarin.Forms, WPF and Silverlight frameworks (for C# and VB.NET).
See .NET XAML - 2.0 - Release Notes for more information.
This extension provides support for XAML files originating in .NET frameworks such as Xamarin.Forms, WPF and Silverlight. The calculation of Automated Function Points for your .NET analyses will be supplemented through the creation of new links specific to the framework that will link back to objects/links produced by the base .NET analyzer.
In what situation should you install this extension?
If your .NET application contains XAML files and you want to view their links to your C# or VB.NET source code, then you should install this extension. When using AIP Console, the extension will be installed automatically when a .XAML file is encountered in the delivered source code.
Existing extensions for WPF and Silverlight
The .NET XAML extension provides support for two .NET frameworks (WPF and Silverlight) that were previously supported in specific extensions (see WPF and Silverlight Framework). The development of these existing extensions has been discontinued and all new development to support these frameworks will now be actioned in the .NET XAML extension. Please note the following information:
- You can continue to use the WPF and Silverlight Framework extensions for your analyses, however, no new features or bug fixes will be applied in these extensions (i.e. no new releases of the extensions will be published).
- The .NET XAML extension has the same level of support in its first release for the WPF and Silverlight frameworks as was provided in the most recent release of the WPF and Silverlight Framework extensions, however, the .NET XAML extension uses a different analysis method: instead of generating dedicated WPF and Silverlight objects in the analysis results (as was the case for the existing extensions), the .NET XAML extension only creates links between the XAML files and the .NET application source code.
- If you would like to start using the .NET XAML extension, there is no direct upgrade path from the WPF and Silverlight Framework extensions. In addition, Analysis results generated by this extension are entirely different to the results generated by the existing WPF and Silverlight Framework extensions, therefore, moving to the .NET XAML extension will impact your existing analysis results.
- For the Silverlight Framework, CAST does not recommend using the existing Silverlight Framework extension at the same time as the .NET XAML extension (both extensions will generate results for the Silverlight framework, potentially creating confusion). Therefore, moving to the .NET XAML extension will necessarily mean a change in the number of objects and links in your analysis results with additional impacts on rule grades, transactions and function points.
- For the WPF framework, the .NET XAML extension reuses the same extension ID as used by the WPF extension (com.castsoftware.wpf), therefore choosing to use the ≥ 2.0 release of com.castsoftware.wpf will mean that you switch to the .NET XAML extension which will necessarily mean a change in the number of objects and links in your analysis results with additional impacts on rule grades, transactions and function points.
The following WPF frameworks are supported by this extension:
|Xamarin.Forms||All versions up to 5.0|
|Windows Presentation Foundation||All versions up to 4.5|
|Silverlight||All versions up to 5.0|
- Function Points (transactions): a green tick indicates that OMG Function Point counting and Transaction Risk Index are supported
- Quality and Sizing: a green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist
|Quality and Sizing|
CAST AIP release
|8.3.x||C# and VB.NET|
|8.2.x||C# and VB.NET|
Supported DBMS servers
This extension is compatible with the following DBMS servers:
|CAST AIP release||CSS/PostgreSQL|
|All supported releases|
|An installation of any compatible release of CAST AIP (see table above)|
Download and installation instructions
When using AIP Console, the extension will be installed automatically when a .XAML file is encountered in the delivered source code. You should check before beginning the analysis (i.e. by performing an Advanced onboarding) that the correct extension release is being used. If you need to change the release, use the Included interface in AIP Console:
There is nothing further to do. Follow the instructions below to run a new analysis/snapshot to generate new results:
- Advanced onboarding - run and validate the initial analysis
- Advanced onboarding - snapshot generation and validation
CAST Transaction Configuration Center (TCC) Entry Points
A set of specific Transaction Entry Points and Ignored Tables for Data Entities are automatically imported when the extension is installed. These Transaction Entry Points will be available in the CAST Transaction Configuration Center:
Packaging, delivering and analyzing your source code
Once the extension is installed, no further configuration changes are required before you can deliver your .NET source code and run an analysis.
What results can you expect?
Once the analysis/snapshot generation has completed, you can view the results in the normal manner. The following objects and links will be displayed in CAST Enlighten:
No objects are generated by the extension. The extension will create links between XAML source files which are produced by .NET Analyzer and the .NET application source code.
- relyon links to .NET classes
- call links to .NET methods
- call links to .NET property set and property get
- relyon links to the parent property of the getter and setter:
In this section we list the most significant functional limitations that may affect the analysis of applications using WPF:
- Binding in code is not supported - see https://msdn.microsoft.com/en-us/library/ms742863(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1 for an example
Binding links are not handled correctly when the same binding target exists in different classes
- The direction of the data flow (Binding.Mode properties such as OneWay, TwoWay and OneWayToSource) is not supported - see https://msdn.microsoft.com/en-us/library/ms752347(v=vs.110).aspx#direction_of_data_flow for an example
- The RelativeSource property (Gets or sets the binding source by specifying its location relative to the position of the binding target) is not supported - see https://msdn.microsoft.com/en-us/library/system.windows.data.binding.relativesource(v=vs.110).aspx for an example
- Links between XAML Source File objects and code embedded in XAML are not supported.