Solving Error "Could Not Load File or Assembly Microsoft SqlServer DTSRuntimeWrap"


This document provides a detailed guide to solving the error "Could Not Load File or Assembly Microsoft SqlServer DTSRuntimeWrap". This error occurs when the .NET application is targeting .NET Framework 2.0 and using Microsoft.SqlServer.DTSRuntimeWrap, which is not available in the .NET Framework 2.0. This document will provide helpful information for developers facing this issue.

The guide will begin with a discussion of the issue and the root causes before providing step-by-step instructions on how to resolve the issue.

Overview of Issue

The error "Could Not Load File or Assembly Microsoft SqlServer DTSRuntimeWrap" usually appears when trying to call a .NET application that is targeting .NET Framework 2.0, yet includes a reference to the Microsoft.SqlServer.DTSRuntimeWrap library.

The main reason this error occurs is that the Microsoft.SqlServer.DTSRuntimeWrap library was added by default in .NET Framework 3.5 and higher versions, but is not available in the .NET Framework 2.0. This means that the .NET Framework 2.0 applications cannot take advantage of this library and will encounter the "Could Not Load File or Assembly Microsoft SqlServer DTSRuntimeWrap" error.

Step-by-Step Guide to Resolve

Identify and remove the reference to Microsoft.SqlServer.DTSRuntimeWrap from the .NET 2.0 application. This reference is usually found in the application's project file.

Change the .NET Framework version for the application to 3.5 or higher by modifying the application's project file.

(Optional) If the application does not support .NET Framework 3.5 or higher, you can use the Windows Compatibility Pack to add support for the Microsoft.SqlServer.DTSRuntimeWrap library.

  1. Rebuild the application in Visual Studio.


Q: What version of the .NET Framework should I use to fix this issue?

A: The best option is to use a version of the .NET Framework that includes the Microsoft.SqlServer.DTSRuntimeWrap library, such as .NET Framework 3.5 or higher.

Q: Does the Windows Compatibility Pack work with all versions of the .NET Framework?

A: The Windows Compatibility Pack generally works with .NET 2.0, 2.0 SP2, 3.0 and 3.5. However, not all features of the library will be available or fully compatible.

Q: Does this issue affect all .NET 2.0 applications?

A: No, not all .NET 2.0 applications will be affected by this issue. Only applications that include the Microsoft.SqlServer.DTSRuntimeWrap reference will be affected.

Expert answers
for every coding challenge.

Get the information you need to solve your programming problems on, the expert-driven alternative to StackOverflow

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.