Compartilhar via


Web Deploy machineConfig32 Provider

Applies To: Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP

machineConfig32

The machineConfig32 provider synchronizes 32-bit Machine.config file information between two computers.

Example

msdeploy -verb:sync -source:machineConfig32 -dest:machineConfig32,computerName=Server1

The machineConfig32 provider returns the 32–bit related contents of the Machine.config file from the computer that you specify by using the -source argument, or synchronizes the 32–bit related content of the Machine.config file from a source computer to a destination computer. On 64–bit versions of Windows, the provider will work, but it will return or synchronize only 32–bit related content.

In a sync operation, the source and destination values must be the same, and the Machine.config files must be at the same level of configuration. If a path does not exist on the destination, it will be added to the destination. If the path already exists on the target computer, it will be updated with data from the source. Any child elements and attributes that exist underneath the path will be updated.

Synchronizing the .NET Framework 4 Machine.config and Root Web.config Files

You may want to synchronize the .NET Framework 4 versions of the Machine.config and root Web.config files, which are located by default in the %windir%\Microsoft.NET\Framework\v4.0.<xxxxx>\Config folder (32-bit) or in the %windir%\Microsoft.NET\Framework64\v4.0.<xxxxx>\Config folder (64-bit).

In order to synchronize these files, you must remove the entries for the .NET Framework 2.0 from the Msdeploy.exe.config and Msdepsvc.exe.config configuration files. The Msdeploy.exe.config and Msdepsvc.exe.config files are located in the %ProgramFiles%\IIS\Microsoft Web Deploy folder.

The Msdeploy.exe.config and Msdepsvc.exe.config files both contain the following entries by default.

<configuration>

   <startup>

      <supportedRuntime version="v2.0.50727" />

      <supportedRuntime version="v4.0" />

   </startup>

</configuration>

Before you synchronize the .NET Framework 4 Machine.config and root Web.config files, remove the entry for .NET Framework 2.0 from each file, as in the following example.

<configuration>

   <startup>

      <supportedRuntime version="v4.0" />

   </startup>

</configuration>

Important

If you later want to synchronize the .NET Framework 2.0 versions of the Machine.config and root Web.config files, you will need to restore the .NET Framework 2.0 entry in the Msdeploy.exe.config and Msdepsvc.exe.config files.

Warning

You cannot synchronize .Net Framework 2.0 and .Net Framework 4 configuration files in the same Web Deploy command.

Example usages

In the first example, the contents of the Machine.config file are displayed in XML format. In the second example, the contents of the Machine.config file are synchronized to a target computer.

1) Display the contents of the Machine.config file in XML format.

msdeploy -verb:dump -source:machineConfig32 -xml

2) Synchronize the contents of the Machine.config file to a target computer.

msdeploy -verb:sync -source:machineConfig32 -dest:machineConfig32,computerName=TargetServer