DataTransPorterXTB 1.2026.6.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package DataTransPorterXTB --version 1.2026.6.1
                    
NuGet\Install-Package DataTransPorterXTB -Version 1.2026.6.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataTransPorterXTB" Version="1.2026.6.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataTransPorterXTB" Version="1.2026.6.1" />
                    
Directory.Packages.props
<PackageReference Include="DataTransPorterXTB" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DataTransPorterXTB --version 1.2026.6.1
                    
#r "nuget: DataTransPorterXTB, 1.2026.6.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DataTransPorterXTB@1.2026.6.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DataTransPorterXTB&version=1.2026.6.1
                    
Install as a Cake Addin
#tool nuget:?package=DataTransPorterXTB&version=1.2026.6.1
                    
Install as a Cake Tool

Data TransPorter

An XrmToolBox plugin that migrates records from one Dataverse environment to another while preserving the record GUID. A record that does not exist on the target is created with the same Id; a record whose Id already exists on the target is updated.

This is ideal for moving configuration / reference data (and any GUID-sensitive records) between DEV → TEST → PROD without breaking the lookups and references that depend on those Ids.


Features

  • Two-environment workflow – select a Source and a Target connection independently, using the standard XrmToolBox connection picker.
  • Entity picker from the Default solution – loads the entities contained in the source environment's Default solution into a dropdown.
  • FetchXML-driven selection – you supply the FetchXML that decides exactly which records are migrated. A starter template is generated automatically when you pick an entity.
  • GUID preserved – records keep their primary key across environments (create-with-Id / update-by-Id).
  • Schema-aware writes – read-only columns (calculated/rollup, audit, and other non-writable system fields) and link-entity (AliasedValue) columns are skipped automatically so writes don't fail.
  • Optional ownership – migrate ownerid (off by default).
  • Optional status – migrate statecode / statuscode using SetStateRequest (a proper, supported state transition), applied after the record is written (off by default).
  • N:N associations – optionally replicate many-to-many relationship links (the rows behind an associated view subgrid) on the target via Associate. You pick which relationships to include per entity.
  • Robust paging – source queries are paged automatically (handles > 5000 records).
  • Progress, cancel, and a full log – created / updated / failed counts plus per-record errors.

Requirements

  • XrmToolBox (current release – runs on .NET Framework 4.8).
  • Permissions on both environments: read on the source, create/update (and, for status migration, the relevant state-transition privileges) on the target.

Build

Open MigrateData.sln in Visual Studio 2022 and build, or from a developer prompt:

& "C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" `
    MigrateData.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU"

A Debug build copies DataTransPorter.dll (+ .pdb) into DataTransPorter\bin\Debug\Plugins\ via the post-build step.

The XrmToolBox host assemblies (XrmToolBox.Extensibility, XrmToolBox.ToolLibrary, McTools.Xrm.Connection, McTools.Xrm.Connection.WinForms) are referenced with Private=False – they are provided by the host at runtime and are not copied to the output, which avoids version conflicts.


Install into XrmToolBox (manual / local)

Copy DataTransPorter.dll into your XrmToolBox Plugins folder, then restart XrmToolBox:

%APPDATA%\MscrmTools\XrmToolBox\Plugins

The tool appears in the tool list as Data TransPorter.


Publish to the XrmToolBox Tool Library (public)

XrmToolBox's in-app Tool Library (Configuration ▸ Tool Library) is fed from NuGet.org. A package is auto-discovered and installable for everyone when it:

  1. is tagged XrmToolBox,
  2. ships the tool assembly under lib\<tfm>\Plugins\ (third-party dependency DLLs, if any, go in a sub-folder named exactly like the tool DLL), and
  3. declares a dependency on the XrmToolBox package (the host-version marker).

This repo already contains everything for that: DataTransPorter.nuspec and pack-and-publish.ps1.

One-time setup

  1. Create a free NuGet.org account and an API key: https://www.nuget.org/account/apikeys (scope it to Push new packages and package versions).
  2. Edit DataTransPorter.nuspec and set:
    • <id>must be globally unique on NuGet.org (e.g. contoso.DataTransPorter). It must not collide with another package, and the tool DLL name (DataTransPorter.dll) must not collide with another installed tool.
    • <authors>, <projectUrl>, <license> – your details.
    • (optional) an icon – drop a ≥128×128 PNG at images\icon.png and uncomment the <icon> and matching <file> lines.

Build, pack and publish

# build + pack only (inspect artifacts\*.nupkg first)
.\pack-and-publish.ps1

# build + pack + publish to NuGet.org
.\pack-and-publish.ps1 -Push -ApiKey oy2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

After NuGet finishes indexing (a few minutes) the tool shows up in the Tool Library; users click Install. There is no separate approval step, but the package must pass NuGet's validation and follow the three rules above.

Publishing requirements checklist

  • ✅ Tagged XrmToolBox (first tag).
  • ✅ Tool DLL in lib\net48\Plugins\ (the pack script + nuspec do this).
  • ✅ Dependency on XrmToolBox (host-version marker).
  • ✅ Assembly is not strong-named (this project isn't).
  • ✅ Unique NuGet id and unique tool DLL name.
  • ✅ Host assemblies (XrmToolBox.Extensibility, McTools.Xrm.Connection, Xrm SDK) are not bundled — they're referenced with Private=False and provided by the host at runtime.

Releasing updates

Bump <version> in the nuspec (date-based 1.YYYY.M.rev is the XrmToolBox convention), re-run pack-and-publish.ps1 -Push -ApiKey …, and XrmToolBox offers the update automatically.


Usage

  1. 1. Select Source – choose the environment to read records from. (The connection you are already on when you open the tool is used as the source by default.)
  2. 2. Select Target – choose the environment to write records to.
  3. 3. Load Entities – populates the dropdown with entities from the source Default solution.
  4. Pick an entity. A default FetchXML template is placed in the editor, and the entity's many-to-many relationships load into the N:N associations list.
  5. 4. FetchXML – edit the FetchXML to select exactly the records you want to migrate. Use Count source records to preview how many records match.
  6. (Optional) In the N:N associations list, check any relationships whose links you want replicated on the target.
  7. 5. Migrate Data – confirm the prompt. Each record is created (same GUID) or updated; then, for each checked relationship, the links are replicated via Associate. The log shows a summary.

Options

Option Default Behaviour
Migrate owner (ownerid) off When on, the source ownerid is written to the target. The referenced user/team must exist on the target.
Migrate status (state/status via SetState) off When on, after the record is written the source statecode/statuscode is applied via SetStateRequest. Failures are reported as warnings (the record itself still migrates).
Continue on error on When on, a failing record is logged and migration continues. When off, migration stops at the first failure.

FetchXML examples

Migrate every record of the chosen entity:

<fetch>
  <entity name="mash_service">
    <all-attributes />
  </entity>
</fetch>

Migrate a filtered subset:

<fetch>
  <entity name="mash_service">
    <all-attributes />
    <filter type="and">
      <condition attribute="statecode" operator="eq" value="0" />
      <condition attribute="mash_category" operator="eq" value="100000001" />
    </filter>
  </entity>
</fetch>

Use <all-attributes /> (rather than naming columns) so every migratable field is carried over. Columns that cannot be written (calculated, rollup, audit, etc.) are filtered out automatically against the target schema.


How GUID preservation works

For each source record the tool:

  1. Builds a target Entity with Id = source.Id and the migratable attributes.
  2. Calls Retrieve(target, id, ColumnSet(false)) to check existence.
    • Not found (ObjectDoesNotExist, 0x80040217) → Create(entity) – Dataverse honours the supplied Id, so the record is created with the same GUID.
    • FoundUpdate(entity).

Notes & limitations

  • Reference order – references (lookups) resolve by GUID. If a record points to another record that has not been migrated yet, that write fails. Migrate parent/lookup entities first, or run the migration twice (leave Continue on error on for the first pass).
  • N:N associations – only links where the migrated record is one side are replicated, and the other side must already exist on the target (otherwise that link is reported as failed). Links that already exist on the target are detected and counted as "already linked" (idempotent). Self-referential N:N is handled best-effort using the Referencing role.
  • Statusstatecode/statuscode are never written as part of the create/update; they are applied separately via SetStateRequest. A status reason of -1 lets the platform pick the default status for the chosen state.
  • Owner / business unit – owning business unit/team/user are system-managed and are never copied; only ownerid is migrated, and only when the option is enabled.
  • Counting loads the matching records to count them; for very large tables prefer a tight FetchXML filter.

Project layout

File Purpose
DataTransPorter/MyPlugin.cs XrmToolBox plugin export (tool name, description).
DataTransPorter/MyPluginControl.cs All tool logic (connections, entity load, migration).
DataTransPorter/MyPluginControl.designer.cs WinForms UI.
DataTransPorter/Settings.cs Persisted options / last selections.
DataTransPorter/DataTransPorter.csproj Project + references (targets .NET Framework 4.8).
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated

1.2026.6.1 - Initial release: GUID-preserving record migration (create/update by Id), default-solution entity picker, FetchXML selection with paging, optional owner and status (SetState) migration, and selectable N:N association replication.