Main Commands
- csharp_set_windows_forms_properties
Sets source file properties for use of Windows Forms:
csharp_set_windows_forms_properties([<files>...])
<files>...A list of zero or more source files which are relevant for setting the
VS_CSHARP_<tagname>source file properties. This typically includes files with.cs,.resx, and.Designer.csextensions.
Use this command when a CSharp target in the project uses Windows Forms.
This command searches in the provided list of files for pairs of related files ending with
.Designer.cs(designer files) or.resx(resource files). For each such file, a corresponding base.csfile is searched (with the same base name). When found, theVS_CSHARP_<tagname>source file properties are set as follows:- For the .cs file:
VS_CSHARP_SubType "Form"
- For the .Designer.cs file (if it exists):
VS_CSHARP_DependentUpon <cs-filename>VS_CSHARP_DesignTime ""(tag is removed if previously defined)VS_CSHARP_AutoGen ""(tag is removed if previously defined)
- For the .resx file (if it exists):
VS_RESOURCE_GENERATOR ""(tag is removed if previously defined)VS_CSHARP_DependentUpon <cs-filename>VS_CSHARP_SubType "Designer"
- csharp_set_designer_cs_properties
Sets source file properties for
.Designer.csfiles depending on sibling filenames:csharp_set_designer_cs_properties([<files>...])
<files>...A list of zero or more source files which are relevant for setting the
VS_CSHARP_<tagname>source file properties. This typically includes files with.resx,.settings, and.Designer.csextensions.
Use this command, if the CSharp target does not use Windows Forms (for Windows Forms use
csharp_set_windows_forms_properties()instead).This command searches through the provided list for files ending in
.Designer.cs(designer files). For each such file, it looks for sibling files with the same base name but different extensions. If a matching file is found, the appropriate source file properties are set on the corresponding.Designer.csfile based on the matched extension:If match is .resx file:
VS_CSHARP_AutoGen "True"VS_CSHARP_DesignTime "True"VS_CSHARP_DependentUpon <resx-filename>
If match is .cs file:
VS_CSHARP_DependentUpon <cs-filename>
If match is .settings file:
VS_CSHARP_AutoGen "True"VS_CSHARP_DesignTimeSharedInput "True"VS_CSHARP_DependentUpon <settings-filename>
Note
Because the source file properties of the .Designer.cs file are set
according to the found matches and every match sets the
VS_CSHARP_DependentUpon
source file property, there should only be one match for
each Designer.cs file.
- csharp_set_xaml_cs_properties
Sets source file properties for use of Windows Presentation Foundation (WPF) and XAML:
csharp_set_xaml_cs_properties([<files>...])
Use this command, if the CSharp target uses WPF/XAML.
<files>...A list of zero or more source files which are relevant for setting the
VS_CSHARP_<tagname>source file properties. This typically includes files with.cs,.xaml, and.xaml.csextensions.
This command searches the provided file list for files ending with
.xaml.cs. For each such XAML code-behind file, a corresponding.xamlfile with the same base name is searched. If found, the following source file property is set on the.xaml.csfile:VS_CSHARP_DependentUpon <xaml-filename>