Duplicated
Last Updated: 28 Sep 2021 08:34 by ADMIN
Simon
Created on: 27 Sep 2021 09:32
Category: UI for WPF
Type: Bug Report
2
Broken reference to Microsoft.VisualStudio.DesignTools.Extensibility in .NET Framework project

When upgrading to UI for WPF R3 2021 (NuGet), we are unable to build our projects because of a broken reference to Microsoft.VisualStudio.DesignTools.Extensibility. We also noticed that for each dll, a corresponding *.DesignTools reference was added to the project when we did the update - maybe there is a connection?

How to reproduce

I was able to reproduce the problem by creating a new .NET Framework app (default VS template, .NET Framework 4.8) and adding the Telerik.Windows.Controls.for.Wpf nuget package (see attached screenshot). As soon as the package is added, I get the following IntelliSense warning:

Severity Code Description Project File Line Source Suppression State
Warning Unknown build error, 'Could not load file or assembly 'Microsoft.VisualStudio.DesignTools.Extensibility, Version=16.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)' WpfApp5 Build

When trying to build the project, I get the following error:

Severity Code Description Project File Line Source Suppression State
Error Unknown build error, 'Cannot resolve dependency to assembly 'Microsoft.VisualStudio.DesignTools.Extensibility, Version=16.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.' WpfApp5 Build

Manually adding the nuget package "Microsoft.VisualStudio.DesignTools.Extensibility" resolves the problem.


I would expect the telerik packages to reference the mentioned package as their dependency if it is required (allowing Visual Studio to resolve the missing reference automatically). If this is not possible for some reason, this should at least be noted in the documentation.

 

Regards

Simon M├╝ller

Hofmann F├Ârdertechnik GmbH

 

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
1 comment
ADMIN
Ralitsa
Posted on: 28 Sep 2021 08:34

Hello Simon,

This is already a known issue in the NuGet packages which it`s introduced with R3 2021 version. Here is a direct link to the feedback item where you can track its status. If everything goes fine, the change should be available in the next LIB

When package management in NuGet Package Manager is set to package.config, it references the design assemblies in the project. After further investigation, our development team decides to remove the design tools assemblies for projects targeting .Net Framework 4.0, 4.5, 4.8 versions. 

As a workaround, I can suggest you delete all assemblies which contain DesignTools in their name. Alternatively, I can suggest you upgrading your project to use PackageReference format when using NuGet packages. The PackageReference is supported with Visual Studio 2017 version 15.7 and higher versions as Visual Studio 2019, Visual Studio 2022. More information on how to upgrade can be found in this article: Migrate from packages.config to PackageReference .

If you have any additional questions, please let me know. 

Regards,
Ralitsa
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.