Closed megafinz closed 7 years ago
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.
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.
Further investigations has revealed:
.nuspec
file to force the use of SuccincT.dll
for framework v4.5+, Win 8.1+ etc. 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.
Succinc\<T> v2.2.0 is now available on nuget. This release removes the dependency on .NET Core and thus fixes this issue.
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.