Common Build or Load Problems

Class Does Not Contain (Member) Definition

If you are trying to use a property that requires special syntax (the get- or set-accessor), you'll get an error message that looks like this:

Compiler Error CS0117:
'type' does not contain a definition for 'identifier'


There are two situations when you need to use the get- or set-accessor syntax for properties:

You can check the C# Syntax section in the reference section which displays the correct syntax to use. In addition, you can use the ObjectBrowser or the auto-complete features in Visual Studio .NET.

Name Does Not Exist

If the enum or string constant is not prefixed with its module name, you'll get an error message that looks like this:

Error CS0103:
The name 'identifier' does not exist in the current context


For enums, you must include the module name. For example:

// etc.

For string constants, you must use StringModule. For example:

// etc.

To find the name of a module for a given enum or constant, type the name of the enum value into the Index keyword box in the SDK Documentation (HelpSDK Guide in Softimage).

Each enum and constant page also provides the full name of each value for C# at the top of the page.

No Method Takes <#> Arguments

If you omit an optional argument when calling an object model method you'll get an error message that looks like this:

Error CS1501
No overload for method 'method' takes 'number' arguments


Check the number of arguments the method takes and verify whether you are missing any arguments.


All arguments must be explicitly passed, regardless of whether they are optional for scripting or not.

Property Is Not Supported

If you used a property which requires different data types or classes for getting vs. setting (such as Preferences.Categories or the deprecated XSIApplication.ActiveProject), you'll get an error message that looks like this:

Error CS1545:
Property, indexer, or event 'property' is not supported by the language; try directly calling accessor methods 'set accessor' or 'get accessor'


In some cases, an alternative method or property exists that resolves the problem; for example, XSIApplication.ActiveProject2 is an alternative property which returns and sets a Property object.

In cases where there are no alternative methods or properties, use the accessor method associated with the property. The accessor method can be called by prefixing get_ and set_ to the name of the property:

// Raises compiler error CS1545:
Preferences pref = xsi.Preferences;
ProjectItemCollection proj_itms = pref.Categories; 

// Special syntax as a workaround
ProjectItemCollection proj_itms = pref.get_Categories;
pref.set_Categories( proj_itms );

For more information, see Implementation Differences for Properties.

Type/Namespace Could Not Be Found or Does Not Exist

If the Softimage Object Model assemblies were not properly installed or referenced or you forgot to reference them with the using directive, you'll get an error message that looks like this:

Error CS0246:
The type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?)


Error CS0234:
The type or namespace name 'name' does not exist in the namespace 'namespace' (are you missing an assembly reference?)


Verify whether the following directives appear in your .cs source file (the plug-in wizards include them automatically):

using XSIOM; // Softimage object model
using XSIMath;
using XSIUtil;

If they do appear, most likely the assemblies have not been either referenced or installed properly. Open the References folder in the Solution Explorer:

If the assembly you are trying to use is not in the list you can right-click to add a reference to the assembly. If it is in the list then it is possible that it has not been installed properly. To correct this situation, you need to find out whether it was properly installed and if not, add it to the GAC.