Completed
Last Updated: 28 Mar 2023 16:56 by RAY
Phil
Created on: 15 Mar 2023 19:51
Category: UI for Blazor
Type: Bug Report
3
The type 'DataSourceRequest' is defined in an assembly that is not referenced.

Hi

Trying to update to the latest version but in output in GitHub Actions it shows:

The type 'DataSourceRequest' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.DataSource, Version=2.1.3.0

However in my csproj I am referencing <PackageReference Include="Telerik.DataSource" Version="2.1.3" />

Any ideas?

6 comments
RAY
Posted on: 28 Mar 2023 16:56

I finally got it to work (hardly call this a reasonable solution).  I had to do this:

  • Go to the Telerik Download site and get the DataSource package for 4.0.1.
  • Move/copy all Telerik Nuget packages to a local folder (and no longer user our DevOps Arrifact library). I will probably get in trouble for that.
  • Change my Nuget settings in the solution to use the local folder as a Nuget source.
  • Will likely have to change my DevOps builds to restore from the new local folder.

I had to do all of this because you issued a new version of the file without changing the version number. 

ADMIN
Dimo
Posted on: 28 Mar 2023 16:50

Hello Ray,

I just tested the NuGet packages on our Downloads page and confirm that they work.

Are you referring to a scenario with Azure artifacts? I assume not, as this is already discussed in the forum. Replacing the whole Azure feed may help in that case, but frankly, I can't confirm for sure. We will bump the Telerik.DataSource version in our next release in late April.

If you are talking about a local environment, then the invalid Telerik.DataSource package is still used and retrieved from somewhere. You can verify this if you build the same project on another machine.

I suggest inspecting all NuGet.Config files, which affect the project. This will point you where the offending NuGet package is.

Regards,
Dimo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

RAY
Posted on: 28 Mar 2023 16:28

We download the nuget packages via your download page (we do not use your Nuget site).  I tried re-downloading the datasoruce package and did all that you describe and it still does not work.    I still get this error:

The type 'GroupDescriptor' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.DataSource, Version=2.1.3.0, Culture=neutral, PublicKeyToken=29ac1a93ec063d92'. c:\CBSA_Apps\CBSAWeb\CBSAW2023_R2\CBSAW\Components\PrjTrk\Reports\WindSolarIntRptComp.razor 143

ADMIN
Dimo
Posted on: 28 Mar 2023 06:27

@Ray - please do the following to resolve the case -

  1. Close Visual Studio
  2. Delete the bin and obj folders from all affected projects
  3. Clear the NuGet cache, or at least delete the telerik.datasource folder
  4. Restart Visual Studio and restore the NuGet packages from our server.
  5. Everything should be fine now.

Regards,
Dimo
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.

RAY
Posted on: 27 Mar 2023 21:30
Since the fixed package does not have a new version number, I am unable to load it into our local Nuget repository.   So, until Telerik comes out with a new version of that package, we cannot use the Telerik components.  Not a good situation.
ADMIN
Dimo
Posted on: 15 Mar 2023 21:14

Hi Phil,

Please see https://www.telerik.com/forums/error-cs0012-the-type-datasourcerequest-is-defined-in-an-assembly-that-is-not-referenced-you-must-add-a-reference-to-assembly-telerik-datasource-versi

Regards,
Dimo
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.