Home > Back-end >  Could not locate the assembly "Microsoft.Expression.Drawing" in a WPF solution
Could not locate the assembly "Microsoft.Expression.Drawing" in a WPF solution

Time:10-06

I attempt to open and build a WPF solution in Visual Studio 2022. However, I get this build error:

Could not resolve this reference. Could not locate the assembly "Microsoft.Expression.Drawing". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

A similar issue has been posted before regarding Microsoft.Expression.Interactions here. However, how can I resolve the issue for Microsoft.Expression.Drawing? I've installed the Microsoft.Xaml.Behaviors.Wpf NuGet package.

CodePudding user response:

The new Microsoft.Xaml.Behaviors.Wpf NuGet package replaces the System.Windows.Interactivity types that were shipped as part of Blend. It does not provide Microsoft.Expression.Drawing types.

The expression blend assemblies are deprecated and not shipped anymore. The Blend for Visual Studio SDK for .NET could be installed until Visual Studio 2017 and found here:

C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.5\Libraries

You could download Visual Studio 2017 (Community is sufficient) and install it from there.

The original Blend SDK was still provided by Microsoft for download as standalone about a year or two ago, but now all the links are dead. Fortunately, there is a snapshot on Wayback Machine where you can reach the original download.

Other than that there are only unofficial sources like these NuGet packages:

If you can, please stick to the original SDK, since unofficial packages may contain any code, including malware. They might impose a security risk or contain assemblies not allowed for redistribution.

  • Related