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

older releases / other target versions #1

Open
Alex-ley opened this issue Sep 12, 2022 · 0 comments
Open

older releases / other target versions #1

Alex-ley opened this issue Sep 12, 2022 · 0 comments

Comments

@Alex-ley
Copy link

Alex-ley commented Sep 12, 2022

Just wanted to check that this repo was the one that creates this nuget package? https://www.nuget.org/packages/MessageBoxEx/

If so, you had some more recent commits that look like they start to target newer versions of .NET (core) and the README says:

NEW! - Added .NET 5.0 WinForms projects. You can now use these projects without the .NET Framework.

on nuget I only see v1.0.0 and don't see any older versions or versions targeting other (older) frameworks.

TLDR; This package looks awesome 👏 and is exactly what I need. Would you be able to publish some older package versions and/or versions targeting other (older) frameworks? Alternatively, could you point me to a git commit when this code did work with older Frameworks? I looked for version tags and branches but couldn't see any so I am not 100% sure how far I should go back etc. Thanks for any help/advice. I could end up creating this sort of custom message box myself but it seems a shame to reinvent the wheel. I could potentially (after some direction) help and submit a PR to this repo to enable publishing old versions of the package or versions targeting other (older) frameworks if that would be useful.

What I tried:

I tried to use v1.0.0 in a VSTO add-in WinForms class library targeting .NET Framework v4.6.1 and due to client IT requirements I cannot currently change that. Unfortunately, v1.0.0 of your package failed initially due to missing System.Drawing.Bitmap

Reference required to assembly System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 containing the type 'Bitmap'. Add one to your project.

My understanding is that in .NET Framework you have System.Drawing.Bitmap but in .NET (core) 3.1/5.0/6.0 you have System.Drawing.Common.Bitmap and this is probably causing the issue.

I tried to install the https://www.nuget.org/packages/System.Drawing.Common/4.7.0 package which seems to be the same version of the assembly required by your package but then I got type name conflicts and other issues etc.

So I ended up with this in my .vbproj file

<Reference Include="System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
  <HintPath>..\packages\system.drawing.common.4.7.0\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll</HintPath>
</Reference>

Which then gave me this issue:

image

and this issue:

Import of type 'MarshalByRefObject' from assembly or module 'System.Runtime.dll' failed

This makes me think v1.0.0 of your package (and/or .NET (core) 3.1) don't play nicely with .NET Framework 4.6.1. Also, after reading this https://stackoverflow.com/questions/42009086/the-type-marshalbyrefobject-is-defined-in-an-assembly-that-is-not-referenced it sounds like my attempts to "fix" this are not getting me anywhere.

My request: would you be able to publish some older package versions and/or versions targeting other (older) frameworks? Alternatively, could you point me to a git commit when this code did work with older Frameworks? I looked for version tags and branches but couldn't see any so I am not 100% sure how far I should go back etc. I could potentially contribute to this repo if useful.

Thanks a lot.

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

1 participant