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

Hard dependency on System.Runtime 4.1.0 #18

Closed
megafinz opened this issue Jan 16, 2017 · 4 comments
Closed

Hard dependency on System.Runtime 4.1.0 #18

megafinz opened this issue Jan 16, 2017 · 4 comments

Comments

@megafinz
Copy link

I was trying to use it in a WPF application targeting .Net Framework 4.6.1, but it crashed when code reached usage of SuccincT. Exception details imply that it wants System.Runtime.dll 4.1.0.0 but I had only 4.0.0.0 available in GAC. I had to install .Net 4.6.2 Developer Pack and retarget all my assemblies to 4.6.2 instead of 4.6.1, so I am able to install System.Runtime package from NuGet. The latest version is 4.3.0, but unfortunately app still crashed when I tried to use that. I downgraded the package to 4.1.0 and that fixed the issue for me.

It appears that SuccincT is bound strictly to 4.1.0.0.

@DavidArno
Copy link
Owner

Looking through various files:

SuccincT\SuccincT.csproj contains <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
SuccincT.Core\project.json depends on "NETStandard.Library": "1.6.0"
SuccincT\SuccincT.nuspec and SuccincT\nuget-pack.bat bundle SuccincT.dll and SuccincT.Core.dll into the nuget package...

but, SuccincT.Core\SuccincT.Core.xproj contains a <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> reference. Which is odd as my intention was that SuccincT.Core.dll only targeted dotnetcore.

So between me not knowing what I'm doing and Visual Studio possibly trying to be helpful, something has gone wrong. I had previously noted that with a framework 4.5.2 project that it seemed to use the dotcore dll, but I put that down to me misreading things. It doesn't explain you finding a hard dependency on v4.1, but I now know where to start trying to fix things.

I'm working on a new release to address @rubiktubik's request for JSON serialisation support (#17), so will aim to bundle a fix for this issue too in that release.

@DavidArno
Copy link
Owner

Update on this.

I created a .NET Framework 4.6.2 test project and added Succinc<T> via nuget. This added a dependency to SuccincT.Core.dll. Running it, it does indeed die with an error complaining it's dependent on System.Runtime v4.1. I then pointed it directly at the SuccincT.dll and it all worked correctly. So .NET Framework projects do pick up the wrong version of the dll.

I have no idea at this stage how to fix this though. So I've sought help on Stack Overflow. Hopefully I'll get a good answer there and will be able to fix this.

@DavidArno
Copy link
Owner

Further investigations has revealed:

  1. Succinc<T> only works with projects that target framework v4.0 or Windows 8 (not 8.1). Every other framework results in this system runtime incompatibility problem.
  2. I can hard-code dependencies into the .nuspec file to force the use of SuccincT.dll for framework v4.5+, Win 8.1+ etc.
  3. However, and this is the killer, I can't work out how to create a test project for dotnet core that is both compatible with Succinc<T> and any sort of testing framework. So I've no real idea if the core version even works with any real dotnet core project.

As the next release, v2.2, was going to be an update for JSON.Net support (which won't include dotnet core), I am going to therefore drop support for dotnet core with this release. That way I can go ahead and release next week.

DavidArno added a commit that referenced this issue Jan 25, 2017
1. Disabled the inclusion of the .NET Core version of Succinc<T> within the nuget package.
2. Updated versions to 2.2.0 in preparation for release.
3. Added SuccincT.JSON nuget stuff
4. Updated readme in readiness for the release.
@DavidArno
Copy link
Owner

Succinc<T> v2.2.0 is now available on nuget. This release removes the dependency on .NET Core and thus fixes this issue.

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

2 participants