Windows XP Media Center Edition SDK Compiling an Add-in 

banner art
PreviousNext

Compiling an Add-in

Media Center supports specific versions of the .NET Framework as follows:

  • Update Rollup 2 for Windows XP Media Center Edition 2005 uses the .NET Framework 1.1 and add-ins run inside the EhExtHost process. Use Microsoft Visual Studio .NET 2003 to write and compile for the .NET Framework 1.1.
  • Windows XP Media Center Edition 2005 uses the .NET Framework 1.0 and add-ins run inside the Media Center process. Use Visual Studio .NET 2002 to write and compile for the .NET Framework 1.0. If you want to use Visual Studio .NET 2003, follow the .NET Framework Version 1.0 command-line compiler instructions later in this topic.

Add-ins that are compiled to the 1.0 version of the .NET Framework are forcibly run against the 1.1 version in Update Rollup 2 for Windows XP Media Center Edition 2005.

The .NET Framework includes a set of command-line compilers. You can use one of these to compile source code written in the IDE of your choice.

  • For add-ins written in C#, use csc.exe.
  • For add-ins written in Visual Basic .NET, use vbc.exe.
  • For add-ins written in JScript .NET, use jsc.exe

Command-line compilers are specific to the version of the .NET Framework and are located in subdirectories of the following location, where %windir% specifies the location at which Windows is installed:

%windir%\Microsoft.NET\Framework\

.

The following example shows how to use the C# compiler to compile an add-in assembly (DLL) for the .NET Framework 1.1 from two C# source files.

c:\WINDOWS\Microsoft.Net\Framework\v1.1.4322\csc.exe /target:library /reference:C:\WINDOWS\eHome\Microsoft.MediaCenter.dll \\machine\share\addin\MyAddIn.cs \\machine\share\addin\AssemblyInfo.cs

For information about how to use the command-line compilers, see Building from the Command Line on the MSDN Web site.

See Also

PreviousNext

© 2005 Microsoft Corporation. All rights reserved.


Page view tracker