Spec-Zone.ru › Ansible

community.windows.win_dotnet_ngen module – Runs ngen to recompile DLLs after .NET updates

Note

This module is part of the community.windows collection (version 3.1.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.windows.

To use it in a playbook, specify: community.windows.win_dotnet_ngen.

  • Synopsis
  • Notes
  • Examples
  • Return Values

Synopsis

  • After .NET framework is installed/updated, Windows will probably want to recompile things to optimise for the host.
  • This happens via scheduled task, usually at some inopportune time.
  • This module allows you to run this task on your own schedule, so you incur the CPU hit at some more convenient and controlled time.
  • https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator#native-image-service
  • http://blogs.msdn.com/b/dotnet/archive/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up.aspx

Notes

Note

  • There are in fact two scheduled tasks for ngen but they have no triggers so aren’t a problem.
  • There’s no way to test if they’ve been completed.
  • The stdout is quite likely to be several megabytes.

Examples

- name: Run ngen tasks
  community.windows.win_dotnet_ngen:

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

dotnet_ngen64_eqi_exit_code

integer

The exit code after running the 64-bit ngen.exe executeQueuedItems command.

Returned: 64-bit ngen executable exists

Sample: 0

dotnet_ngen64_eqi_output

string

The stdout after running the 64-bit ngen.exe executeQueuedItems command.

Returned: 64-bit ngen executable exists

Sample: "sample output"

dotnet_ngen64_update_exit_code

integer

The exit code after running the 64-bit ngen.exe update /force command.

Returned: 64-bit ngen executable exists

Sample: 0

dotnet_ngen64_update_output

string

The stdout after running the 64-bit ngen.exe update /force command.

Returned: 64-bit ngen executable exists

Sample: "sample output"

dotnet_ngen_eqi_exit_code

integer

The exit code after running the 32-bit ngen.exe executeQueuedItems command.

Returned: 32-bit ngen executable exists

Sample: 0

dotnet_ngen_eqi_output

string

The stdout after running the 32-bit ngen.exe executeQueuedItems command.

Returned: 32-bit ngen executable exists

Sample: "sample output"

dotnet_ngen_update_exit_code

integer

The exit code after running the 32-bit ngen.exe update /force command.

Returned: 32-bit ngen executable exists

Sample: 0

dotnet_ngen_update_output

string

The stdout after running the 32-bit ngen.exe update /force command.

Returned: 32-bit ngen executable exists

Sample: "sample output"

Authors

  • Peter Mounce (@petemounce)

Collection links

  • Issue Tracker
  • Repository (Sources)
  • Communication

© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/windows/win_dotnet_ngen_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API