CodeStencil.Debug.xml

The file - CodeStencil.Debug.xml lets you specify where your code nanites are loaded from. This can become quite useful when you are trying to step through the code you have written for a code nanite.

This is what the file looks like:

<?xml version="1.0" encoding="utf-8"?>
<CodeNaniteAssemblies>  
  <AssemblyLoadPath>D:\Custom Stencils\3rd Party Stencils\Syncfusion\Blazor-DataGrid\SyncfusionGrid\Assemblies\ZeraSystems.Syncfusion.Core.dll</AssemblyLoadPath>  

  <AssemblyLoadPath>D:\Custom Stencils\3rd Party Stencils\Syncfusion\Blazor-DataGrid\SyncfusionGrid\Assemblies\ZeraSystems.Syncfusion.Grid.dll</AssemblyLoadPath>  

  <AssemblyLoadPath>D:\Custom Stencils\3rd Party Stencils\Syncfusion\Blazor-DataGrid\SyncfusionGrid\Assemblies\ZeraSystems.CodeNanite.Schema.dll</AssemblyLoadPath>  

  <AssemblyLoadPath>D:\Custom Stencils\3rd Party Stencils\Syncfusion\Blazor-DataGrid\SyncfusionGrid\Assemblies\ZeraSystems.CodeNanite.Expansion.dll</AssemblyLoadPath>  

</CodeNaniteAssemblies> 

So, even though you may have an installed copy of your code nanite (ZeraSystems.Syncfusion.Grid.dll, etc.) installed in:

C:\Documents\CodeStencil\Stencils\SyncfusionGrid

You can force the one you are debugging to load from a separate folder.

There are 2 tags that you can use in this debug file:

(1) Assembly Load Path - This is the path to specific assemblies. When specified the assembly(ies) will be loaded first instead of the ones installed by CodeStencil

<?xml version="1.0" encoding="utf-8"?>

<CodeNaniteAssemblies>  
  <CodeNanitePath>D:\Custom Stencils\3rd Party Stencils\DevExpress\DevExtremeAspCore\DevExtremeAspCore\Assemblies</CodeNanitePath>  
  <AssemblyLoadPath>D:\Custom Stencils\3rd Party Stencils\DevExpress\DevExtremeAspCore\DevExtremeAspCore\Assemblies\ZeraSystems.DevExtremeAspCore.dll</AssemblyLoadPath>  
</CodeNaniteAssemblies> 

In this example, the Assembly:

D:\Custom Stencils\3rd Party Stencils\DevExpress\DevExtremeAspCore\DevExtremeAspCore\Assemblies\ZeraSystems.DevExtremeAspCore.dll

will be loaded, this way you can put breakpoints in your code to help with debugging.

(2) Code Nanite Path - When this is specified, all the assemblies in the specified path are loaded. So the sample file shown could have been replaced by this:

<?xml version="1.0" encoding="utf-8"?>

<CodeNaniteAssemblies>  
  <CodeNanitePath>D:\Custom Stencils\3rd Party Stencils\Syncfusion\Blazor-DataGrid\SyncfusionGrid\Assemblies\</CodeNanitePath>  
</CodeNaniteAssemblies> 

Note: DO NOT enclose the strings specified between the tags with quotes.


Was this article helpful?