Closed jaeshort closed 1 year ago
I just looked into compiling on .NET Standard 2.0 and turns out there is some work that needs to be done in addition to breaking API changes where most of the issues are related to use of dynamic.
I changed the framework just to .NET 4.6.1 and ran the tests with several failing against the new version of Splunk. I am guessing they are broken api changes like you are experiencing. I may have to just take some of the working code out for what I need until the SDK can be updated for the latest REST API.
@jaeshort You can see on the master branch that there are failing builds: https://github.com/splunk/splunk-sdk-csharp-pcl/commits/master
And no, I was referring to compiler issues, not failing tests. Some of the output I get from dotnet build
is:
ApplicationCollection.cs(113,26): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' [\Splunk.Client\Splunk.Client\Splunk.Client.csproj]
Application.cs(176,26): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' [\Splunk.Client\Splunk.Client\Splunk.Client.csproj]
ApplicationCollection.cs(119,26): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' [\Splunk.Client\Splunk.Client\Splunk.Client.csproj]
This is because the SDK is implicitly casting a dynamic
type to a concrete type, for example in ApplicationCollection.cs there is the following function:
public virtual ReadOnlyCollection<Message> Messages
{
get { return this.Snapshot.GetValue("Messages") ?? NoMessages; }
}
The GetValue
returns a dynamic
type, and the compiler will then cast this implicitly to an ReadOnlyCollectiondynamic
is used instead of object casting/generic functions as I don't know this code-base well enough.
Any update on .NET Core (2.0) support??
@martinmine Do you guys have any plan to update this package to .Net Core 2.0?
@mohsenvafa I'm not a maintainer of this package and I don't have any plans of porting it although I have looked into how much work it is to make the jump.
Are there still no plans to update it? An update to .NET Standard 2.0 would be quite nice...
This SDK is deprecated and no longer under active development.
It would be nice to have a .NET CORE 2.0 NuGet since new development in Visual Studio will be utilizing these standards.