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

Incompatibility with .NET 4.8 Version 5.15.0 #728

Closed
MaximG1234 opened this issue Mar 14, 2022 · 7 comments
Closed

Incompatibility with .NET 4.8 Version 5.15.0 #728

MaximG1234 opened this issue Mar 14, 2022 · 7 comments

Comments

@MaximG1234
Copy link

Hi all,

I have a project which targets .NET 4.8 using this library. I have seen the post #438 which references removal of .NET framework support for this library but seems to suggest that it will still be possible to reference this project provided you are using .NET 4.6.1 or higher.

Unfortunately when I try and update ShopifySharp on my project I receive the error: 'You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.'

I am using Visual Studio 2019 and wondering if anyone can clarify if this is a limitation of VS2019 or if I might be doing something else wrong or if perhaps there is an issue with the package targets?

Kind regards,

Max

@nozzlegear
Copy link
Owner

Hey @MaximG1234, have you tried installing the preview version for the latest ShopifySharp build? I've only just published it in the last week or so. This preview version targets netstandard 2.0 which should be compatible with .NET 4.6.1 and above. If you're using Visual Studio, you can install it with the package manager like so:

Install-Package ShopifySharp -Version 5.15.0-b00503

That should let you use it with your .NET 4.8 project. Let me know if that solves the issue for you, I've been waiting to hear feedback from users still on .NET Framework before publishing a full, non-preview build.

@MaximG1234
Copy link
Author

MaximG1234 commented Mar 20, 2022

Hi, @nozzlegear Thanks very much for this. I can confirm that I was able to successfully install the version referenced into my .NET 4.8 project however I then received the error:

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Extensions.Http, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
(Fully-specified)
LOG: Appbase = file:///C:/..../Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : ShopifySharp, Version=5.15.0.0, Culture=neutral, PublicKeyToken=null.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:.......exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Extensions.Http, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

It was then necessary for me to add the package Microsoft.Extensions.Http.6.0.0 to my project which did appear to resolve the issue and I appear to be successfully calling the API however I am aware that this is not actually the version which is referenced and might be incorrect. I haven't yet tried adding the package Microsoft.Extensions.Http 2.1.0.0 which I assume would be more correct (as I am not sure it will be compatible and for now my issue has been resolved).

I will provide feedback once I have tried the correct package and have more information.

Thanks again for your help!

@liamwellsmnp
Copy link

Hi @nozzlegear,

I had the same issue with targeting .NET4.8 with the latest release but have tried the beta and this has resolved the issue for me.

Thanks!

@ThatBrianK
Copy link

just wanted to chime in and say that version 5.15.0-b00503 has been working great for me and I look forward to seeing it in production!

@nozzlegear
Copy link
Owner

nozzlegear commented Jul 14, 2022 via email

@ThatBrianK
Copy link

great! Are you going to increment the Shopify API version as well? 2022-07 just came out

@nozzlegear
Copy link
Owner

ShopifySharp version 5.16.0 has been released on Nuget and should bring back full support for .NET Framework 4.6.1 and above! Let me know if you have any issues using it.

image

@ThatBrianK 5.16.0 was updated to support 2022-04. I'll be pushing an update in the next few weeks for 2022-07 as well!

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

No branches or pull requests

4 participants