Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for .Net Standard #17

Closed
trembon opened this issue Mar 12, 2018 · 18 comments
Closed

Support for .Net Standard #17

trembon opened this issue Mar 12, 2018 · 18 comments

Comments

@trembon
Copy link
Contributor

trembon commented Mar 12, 2018

Hello,
Are there any plans to support .Net Standard?
I tried to change the project to Standard 2.0 and added the MySql.Data 8.0.10-rc reference from Nuget without any compiler errors, but havent tested it yet.
So at first glance, there seems to be no code changes need to be made.

@adriancs2
Copy link
Member

Yes sure, the coding used in MySqlBackup.NET is common C# methods and basic syntax. It is backward compatible supports .NET 2.0 as well as forward compatible until .NET Standard 2.0 and even future version.

I'll release the binary of .Net Standard at later time.

@adriancs2
Copy link
Member

I faced a problem converting the code into .Net Standard 1.3
System.Timers does not exist in .NET Standard
some search in Google tells that System.Timers has to be replaced by System.Threading.Timers
and the coding is slightly different.
I will release .NET Standard version at a later time if I have solved the problem.

@SebastianStehle
Copy link

Can you just use .NetStandard2.0?

@adriancs2
Copy link
Member

Can you just use .NetStandard2.0?

Sure

@kl1mm
Copy link

kl1mm commented May 28, 2018

Hey adriancs2,
do you have any idea, when you will release the .NetStandard-Lib on Nuget?
Thanks kl1mm

@kl1mm
Copy link

kl1mm commented Jul 12, 2018

excuse the renewed disturbing but are you still planning the .NetStandard implementation and the release on nuget?

@adriancs2
Copy link
Member

adriancs2 commented Jul 12, 2018

I faced a problem converting the code into .Net Standard
System.Timers does not exist in .NET Standard
some search in Google tells that System.Timers has to be replaced by System.Threading.Timers
and the coding is slightly different.
I will release .NET Standard version at a later time if I have solved the problem.

@trembon
Copy link
Contributor Author

trembon commented Aug 5, 2018

i finally got some time to help you look into this.
i managed to convert to project to .Net Standard 2.0 and it compiled without any warnings.
Are you sure you have to converted the projects to 2.0?
If you have problems i can see if i can find time to do a PR with a raw upgrade of the two projects

@adriancs2
Copy link
Member

Yes, you're welcome

@stlsw
Copy link

stlsw commented Aug 27, 2018

dear @adriancs2
any netstandard release on nuget ?

@adriancs2
Copy link
Member

adriancs2 commented Aug 28, 2018

@StevenLiSiwei Hi bro, the version of .NET Standard 2.0 is published at Nuget a few minutes ago at the time of writing this. You may check it out.

@stlsw
Copy link

stlsw commented Aug 28, 2018

@adriancs2 will check it. Thank you so much for helping on this !!!

@adriancs2
Copy link
Member

@StevenLiSiwei You're welcome

@iamjohnpalencia
Copy link

Hi sir @adriancs2 i've been a fan of your work and really wanted to use the MySqlBackup.NET you did . but i am having trouble

An unhandled exception of type 'System.IO.FileLoadException' occurred in System.Windows.Forms.dll Additional information: Could not load file or assembly 'MySqlBackup, Version=6.9.8.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

At first everything is working fine until i tried to "Publish" my work and that's where the error started i can not debug after making a publish -- i tried to remove add again and try the files you have in the folder but no luck -- how can i make it work again, i am not very pro when it comes to programming and i am just still exploring thank you :)

Details :
VB.NET
Visual Studio Pro 2015
Net Framework : 4.5
MySQL Connector : v6.9.8

@sridhargoshika
Copy link

@iamjohnpalencia go to properties of 'MySqlBackup' DLL and set Copy Local = True and then try publish again. Also make sure that DLL is including or not while publishing your project.

@adriancs2
Copy link
Member

Yes, @iamjohnpalencia , you try out @sridhargoshika 's suggestion first and see if the problem get solved or not :)

@iamjohnpalencia
Copy link

Hello good day :) thank you for the response, unfortunately i did that already but the issue has not been solved. I think the issue is the MySql.data i think it does not have the terms or keyword you have used in Mysqlbackup.net

Scenario : When i use the MySql.data included in sir @adriancs2 's package -- it runs but it can't be publish saying MySql.data is not official or something like that. but the MySqlBackup.net is fine (not pointing as the cause of error) but when i use the official MySql.data from Oracle its pointing to the MySqlbackup.net so i think the cause of the problem is the Mysql.data

I just want to ask - is the Mysql.data included in the zip file of sir @adriancs2 is somewhat modified or not :) thanks a lot :) and i really admire pro_programmers like you guys <3

@adriancs2
Copy link
Member

I did not modify MySQL.Data.DLL.
Your problem might be one of the causes below:

  1. Different target build platform of x64 bit or x86 bit.
  2. Your application build setup requires referenced DLL must be signed too (strong name). All the releases of MySqlBackup.NET are not signed. Therefore, I think you can try to recompile MySqlBackup.NET by signing it. You can try download the source code of MySql.Data.DLL which contains a Strong Name Key File (ConnectorNetPublicKey.snk) that you can used to sign MySqlBackup.NET.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants