Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Help / prop_tgt / VS_DOTNET_STARTUP_OBJECT.rst
1 VS_DOTNET_STARTUP_OBJECT
2 ------------------------
3
4 .. versionadded:: 3.24
5
6 Sets the startup object property in Visual Studio .NET targets.
7 The property value defines a full qualified class name (including package
8 name), for example: ``MyCompany.Package.MyStarterClass``.
9
10 If the property is unset, Visual Studio uses the first matching
11 ``static void Main(string[])`` function signature by default. When more
12 than one ``Main()`` method is available in the current project, the property
13 becomes mandatory for building the project.
14
15 This property only works for Visual Studio 11 2012 and above;
16 it is ignored on other generators.
17
18 .. code-block:: cmake
19
20   set_property(TARGET ${TARGET_NAME} PROPERTY
21     VS_DOTNET_STARTUP_OBJECT "MyCompany.Package.MyStarterClass")