alphaleonis / AlphaVSS

AlphaVSS is a .NET class library released under the MIT license providing a managed API for the Volume Shadow Copy Service also known as VSS.

Home Page:http://alphavss.alphaleonis.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for .NET Core

OFark opened this issue · comments

commented

I'm building a service with web interface, hence .net Core. Cannot get it to work with AlphaVSS. Specifically it claims it can't find AlphaVSS.x64. Also my project moans about the nuget package targeting .net framework with may not be compatible with .net core 2

I haven't looked into this issue in detail, but a few quick searches suggests that .NET Core does not support C++/CLI, which is what makes up most of AlphaVSS. If this is the case then that would indeed make it a pretty difficult task to get it over to .NET Core.

But please correct me if I'm wrong here.

commented

I think this would be helpful as .NET core is spreading.
I dont think it is technical problem - of course it would not be multiplatform as .NET core is, but it is not expected.
https://github.com/dotnet/corefx/issues/24444

commented

One more idea.
COM part could be done in pure C++ way (without .NET) and than Common project could reference this using pinvoke interop - https://docs.microsoft.com/en-us/dotnet/standard/native-interop

Or C++ part could skip COM completely and use pure C++ API - https://msdn.microsoft.com/cs-cz/library/windows/desktop/aa384648(v=vs.85).aspx

https://wj32.org/wp/2012/12/13/how-to-backup-files-in-c-using-the-volume-shadow-copy-service-vss/
https://github.com/wj32/Backup/blob/master/Backup/vssobj.cpp

I hope bringing this up again is not too big of an annoyance to you, but todays release of .net core 3.1-preview2 brings support for C++/CLI.

Announced here: https://devblogs.microsoft.com/dotnet/announcing-net-core-3-1-preview-2/

Making your library available to the .net core community would be greatly appreciated. We have multiple projects, that would benefit big time. And I know of at least two more development teams, that I spoke to recently about vss. (You see, our need to support vss was kind of urgent ;)

I would gladly support you, but my C/C++ skills are far from production grade software. If you can think of any other kind of help (aside from code contribution) that would make that job easier for you, feel encouraged to let me know. I will gladly support people who contribute such niche but very important tools like yours.

@langebo Thanks for highlighting this. I was not aware that C++/CLI support was introduced in .NET Core. I will certainly look in to adding support for .NET Core 3.1, though I can't mke any promises.

Just to give an initial report. Things are looking good, and I got a build working with .NET Core 3.1 preview. It will take a little while longer to get things in order, but it is coming anyway. :)

@langebo If you want to try it out and see how it works I uploaded a pre-release package to https://github.com/alphaleonis/AlphaVSS/packages/56723
Make sure to read the changelog on the develop branch though, since there are some breaking changes, and perhaps also the doc at https://github.com/alphaleonis/AlphaVSS/blob/develop/docs/articles/getting_started.md

Nevermind just yet... still some issues that I need to work out.

@langebo Okay, so there we go, there is now an alpha version available on NuGet.

There is also new documentation at http://alphavss.alphaleonis.com/articles/getting_started.html which should get you started with the breaking changes.

Please try it out and let me know if you find anything that isn't working as expected.

A final version will not be released until .NET Core 3.1 is released in final.

@alphaleonis Wow that was quick, thanks for your effort.

I will take a closer look once I return home later this week.