I was using the "Syncfusion.Windows.Forms"from the "Syncfusion.Tools.Windows"in.Net framework, now I have migrated my project to .Net7.0andthese packages are not supported, even if I update both package to its latest version thispackage aren't supported in .Net7.0, it is only supporting on the "window" specific platform but if change the platform to "None", this package will not support.
Below is the output for package installation -
For Syncfusion.Shared.Base
Restoring packages for W:gw_de0157\CoLOS_6_4_X_Quarterly\CoLOSgw_de0157gwservices_de0180\code\localisationmanager\localisationmanager.csproj...
CACHE https://api.nuget.org/v3/vulnerabilities/index.json
CACHE https://api.nuget.org/v3-vulnerabilities/2024.01.10.00.53.53/vulnerability.base.json
NU1701: Warning As Error: Package 'Syncfusion.Shared.Base 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
Package restore failed. Rolling back package changes for 'localisationmanager'.
For Syncfusion.Tools.Windows -Restoring packages for W:gw_de0157\CoLOS_6_4_X_Quarterly\CoLOSgw_de0157gwservices_de0180\code\localisationmanager\localisationmanager.csproj...
CACHE https://api.nuget.org/v3/vulnerabilities/index.json
CACHE https://api.nuget.org/v3-vulnerabilities/2024.01.10.00.53.53/vulnerability.base.json
NU1701: Warning As Error: Package 'Syncfusion.Grid.Base 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
NU1701: Warning As Error: Package 'Syncfusion.Grid.Windows 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
NU1701: Warning As Error: Package 'Syncfusion.Shared.Base 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
NU1701: Warning As Error: Package 'Syncfusion.Shared.Windows 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
NU1701: Warning As Error: Package 'Syncfusion.SpellChecker.Base 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
NU1701: Warning As Error: Package 'Syncfusion.Tools.Base 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
NU1701: Warning As Error: Package 'Syncfusion.Tools.Windows 24.1.45' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.
Package restore failed. Rolling back package changes for 'localisationmanager'.
Below is my code -
using System.Globalization;
using MARKEM.LocalisationServices;
using Syncfusion.Windows.Forms;
using Syncfusion.Windows.Forms.Tools;
namespace LocalisationManager
{
public class SyncfusionLocalizer : ILocalizationProvider
{
///
/// Gets the localized string.
///
/// The culture.
/// The name of syncfusion strings.
/// The control to use
///Returns converted resource strings
public string GetLocalizedString(CultureInfo culture, string name, object ctrl)
{
switch (name)
{
case ToolsResourceIdentifiers.NewHorzGroupMenuItemText:
return GlobalResourceManager.GetString("String_New_Horizontal_Tab_Group");
case ToolsResourceIdentifiers.NewVertGroupMenuItemText:
return GlobalResourceManager.GetString("String_New_Vertical_Tab_Group");
case ToolsResourceIdentifiers.CloseMenuItemText:
return GlobalResourceManager.GetString("String_Close_Menu_Item");
case ToolsResourceIdentifiers.MovePrevMenuItemText:
return GlobalResourceManager.GetString("String_Previous_Menu_Item");
case ToolsResourceIdentifiers.MoveNextMenuItemText:
return GlobalResourceManager.GetString("String_Next_Menu_Item");
case ToolsResourceIdentifiers.ToolTipCaptionButtonMenu:
return GlobalResourceManager.GetString("String_ToolTip_Caption_Button_Menu");
case ToolsResourceIdentifiers.ToolTipCaptionButtonPin:
return GlobalResourceManager.GetString("String_ToolTip_Caption_Button_Pin");
case ToolsResourceIdentifiers.ToolTipCaptionButtonClose:
return GlobalResourceManager.GetString("String_ToolTip_Caption_Button_Close");
case ResourceIdentifiers.Yes:
return GlobalResourceManager.GetString("String_Yes");
case ResourceIdentifiers.No:
return GlobalResourceManager.GetString("String_No");
case ResourceIdentifiers.Cancel:
return GlobalResourceManager.GetString("String_ButtonCancel");
case ResourceIdentifiers.OK:
return GlobalResourceManager.GetString("String_ButtonOK");
default:
return string.Empty;
}
}
}
}
-----------------------------------------------------------------------------------------------------------------------------
Is there is any way I can support the cross platform using Syncfusion Package.
Hi Saurav joshi,
Desktop platforms like WPF, WinForms are not supported the cross-platform functionality. Could you please share the details about the process you following to do the cross-platform functionality.?
Providing this detail will help us better understand the issue and work towards finding a solution promptly.
Regards,
Chidanand M.
I have used the .Net Upgrade Assistant - Visual Studio extension to migrate my class library project to .net7.0,
it is not a WPF nor the WinForms project, it a simple class library project.
Hi Saurav joshi,
We are able to replicate the reported scenario, we need some time to analyze this on our end and will provide an update on or before January 17, 2024.
Regards,
Chidanand M.
Hi Saurav joshi,
Our WinForms NuGet packages are compatible with desktop applications. If you want to use the NuGets in a class library file, you must either create a platform-specific library or change the TargetFramework to net7.0-windows in the .csproj file.
.
Kindly refer the below link for supporting compatibility reference.
NuGet Link - NuGet Gallery | Syncfusion.Tools.Windows 24.1.45
Regards,
Chidanand M.