Closed vandijkict closed 5 years ago
Yes I use the nuget package and it is not compatible with asp.net core 1.1 because it uses .net framework now.
Is there maybe another way? Or is there a simple c# class we can use?
Thanks,
Erik van Dijk
Hi, Do you have any updates for this problem? otherwise we have to search for another solution.
Regards,
Erik
I would like to add to this discussion. When adding the library to a .Net Core project, you get the following warning. Package 'MultiSafepay 0.6.12' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project. In my case I'm using .Net Core v2.1. Because we are hosting our app on Windows, this is not a big issue, but people wanting to host on Linux would not be able to use the code.
I did a quick glance over the code and at first glance I don't see anything that would break by updating the library to .Net Standard 2.0 and .Net Core
Is there any updates for this issue?
@K3n4 , wrapper is already compatible with .net core, you having any issues?
@iexperto The wrapper is build with .Net Framework 4.0. Which is not compatible with .Net Core when you want to host on none Windows machines. I have made some minor modifications and will issue a pull request, so this can be integrated.
@BenLuts , thank you! We are actually reviewing and testing the changes.
@BenLuts after reviewing your commit all seems to be correct and working without problems in latest Visual Studio on Mac and Windows, thank you!
Only problem we are facing, that with these changes, not compatible anymore with old Windows Visual Studio Versions, for example Visual Studio 2013.
This could affect also to the existing integrations of other users, some still could be using older versions for their sites, so merging your changes will possibly will force them to upgrade the project.
I will keep your changes in mind for future versions, but I think we can't merge at this point as we need to analyze deeper about the impact.
@iexperto People with older versions of Visual Studio will only face a problem if they want to compile the source code. If they simply use the nuget package they won't have any issue. Also, when creating a new Nuget package for the modified version, references to the older package version will still be working as before.
@BenLuts , some people uses this repository and compile when we add new changes. We always try to keep same version in NuGet and GitHub.
If the upgrade maybe was clean action without errors or warnings, for sure I would merge directly as works correct in newer versions, but as my previous comment, trying to compile your changes with VS 2013:
Firstly the error below is returned
MultiSafepay.csproj : error : The attribute "Remove" in element <Compile> is unrecognized.
Removing the Line below allows compile after restarting VS 2013
<ItemGroup>
<Compile Remove="Model\NotificationUrl.cs" />
</ItemGroup>
Then other errors and warnings appears: Warnings
Warning 1 The 'Sdk' attribute is not declared. MultiSafepay.csproj 2 10 Miscellaneous Files
Warning 2 The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'TargetFrameworks' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutoGenerateBindingRedirects, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, UseDebugLibraries, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, CodeAnalysisConsoleXsl, CodeAnalysisCulture, CodeAnalysisFailOnMissingRule.... ......MultiSafepay.csproj 12 6 Miscellaneous Files
Other 40 errors in Multisafepay.UnitTests
Error 3 The type or namespace name 'Model' does not exist in the namespace 'MultiSafepay' (are you missing an assembly reference?) .... \Tests\MultiSafepay.UnitTests\Model\PaymentOptionsTests.cs 3 20 MultiSafepay.UnitTests
@iexperto The errors are to be expected. The changes require the new csproj format in order to work. Visual Studio 2013 does not support this format as it is a quite outdated IDE.
Could you expand this request, so I can send this request to our plugin developer? Isn't it already compatible with .NET Core or are you getting any errors? Are you using the NuGet package at https://www.nuget.org/packages/MultiSafepay?