> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MicrosoftGame.config 要素 - FileTypeAssociation

> MicrosoftGame.config 要素 - FileTypeAssociation

# MicrosoftGame.config 要素 - FileTypeAssociation

パッケージ内の実行可能ファイルとファイル タイプの関連付けを可能にします。例としては、タイトルのマップ エディター用の特定の拡張子などがあります。

## 親要素

この要素の親は DesktopRegistration 要素です。

## 要件

この要素は省略可能で、設定は必須ではありません。

## プラットフォーム

この要素は PC デバイスのみに関係します。

## 動作

* 属性は Name と Executable です。
* Name 属性には既定値はありません。
* Executable 属性の既定値は、タイトルの ExecutableList 要素内の最初の実行可能ファイルになります。
* Name 属性で使用できる値は、スペースを含まない最大 100 文字の小文字文字列です。
* Executable 属性で使用できる値は、Executable 要素内の Name と一致する実行可能ファイル名です。
* 使用できる値は次の子要素です:
  * DisplayName
  * Logo
  * InfoTip
  * EditFlags
  * SupportedFileTypes

## 解説

### FileTypeAssociation の例

FileTypeAssociation は DesktopRegistration ノードの子要素です。PC 上の実行可能ファイルに関連付けられた追加ファイルの使用を可能にするために使用できます。主な用途は、カスタム MOD またはマップです。この実装の参考として、次の例を参照してください。

```xml theme={null}
<FileTypeAssociation Name="MyModExtension">
  <DisplayName>ExampleFriendlyName</DisplayName>
  <EditFlags OpenIsSafe="true" AlwaysUnsafe="false">
  <InfoTip>ExampleInfo</InfoTip>
  <Logo>ExampleLogo.png</Logo>
  <SupportedFileTypes>
    <FileType>.mod</FileType>
  </SupportedFileTypes>
  <Executable>MyGame.exe</Executable>
</FileTypeAssociation>
```

## 関連項目

[MicrosoftGame.config リファレンス - 目次](/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)


## Related topics

- [MicrosoftGame.config 要素 - SupportedFileTypes](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-supportedfiletypes.md)
- [MicrosoftGame.config 要素 - Logo](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-logo.md)
- [MicrosoftGame.config 要素 - EditFlags](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-editflags.md)
- [MicrosoftGame.config 要素 - InfoTip](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-infotip.md)
- [MicrosoftGame.config 要素 - DisplayName](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-displayname.md)
