serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.59k stars 796 forks source link

Error after pacakage and framework update #6726

Closed vinnaykulkarni closed 1 year ago

vinnaykulkarni commented 1 year ago

Before submitting the bug report, please read and check the following items

What happened?

I have updated the project from .Net core 5 to .Net Core 7 and accordingly, packages got updated, my project gets compiled properly however when I try to add or update existing data I am getting the following error.

Method not found: 'Void Serenity.Data.Row`1.set_TrackAssignments(Boolean)'.

What did you expect to happen?

To get new records and existing records get saved and updated

How to reproduce?

Update the project from .Net core 5 to .Net Core 7 and update packages

What Serenity Nuget Versions are you seeing the problem on? (separated by comma)

Serenity.Scripts 5.1.1

Relevant log output

No response

Serene template version

No response

Sergen version

No response

Code editor

No response

Operating System

No response

Node.js version

No response

TypeScript version

No response

Database type and version

No response

On which device do you see the problem?

No response

On which operating system do you see the problem?

No response

On which browsers do you see the problem?

No response

On what version of the browsers do you see the problem?

No response

Additional information

No response

VictorTomaili commented 1 year ago

We currently support .net 6 LTS and we will continue with .net 8 LTS. But .net 7 should work without any issue if you manually change the framework version.

Your problem is not related .net 7 version. Check the Changelog for IRow and IEditableRow

vinnaykulkarni commented 1 year ago

Dear @VictorTomaili Thanks for the response, I have already checked the changelog for the BRAKING CHNAGE section - however pretty unclear what action needs to be taken on Rows, if you could give an illustration will be helpful. As IRow is already implemented on the row where I am getting the mentioned error.

"[BREAKING CHANGE] Some row properties are only available via IRow or IEditableRow interface. Introduced IEditableRow and instead of making desktop UI editing (e.g. WPF INotifyPropertyChanged, IsAnyFieldChanged, IsEditing) etc. related properties / methods of row instances only accessible via this interface. They were confusing and polluting the row interface in web applications where they were almost never used. Cast the row instance like ((IEditableRow)row).BeginEdit() etc to access them if ever used. Similary, "IdField, IgnoreConstraints, NameField, Table, TrackAssignments, TrackWithChecks, GetDictionaryData, GetDictionaryDataKeys, SetDictionaryData" properties and fields can only be accessed via IRow interface. This is done to avoid polluting intellisense list as they are very rarely used, and as a preparation to fix swagger / apiexplorer integration"

VictorTomaili commented 1 year ago

One of your rows (or rows which you use them to join) may not inherit from the base Row.cs class. This property in the error message exists in the interface, and it is not possible of a missing implementation without a build error. You need to use the Row class instead IRow interface. But to use this field in your code, you need to use ((IRow)MyRow).TrackAssignments

vinnaykulkarni commented 1 year ago

Ohh, thanks for the details, will check with this