How can I use FsCheck with a portable class library? - f#

How can I use FsCheck with a portable class library?
I receive the following error:
Error Could not install package 'FsCheck.Xunit 2.5.0'. You are trying
to install this package into a project that targets
'.NETPortable,Version=v4.5,Profile=Profile7', 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.
Does this mean FsCheck is not PCL compliant?

Related

Install Scandit fail. The package does not contain any assembly references or content files that are compatible with that framework

I am trying to install nuget package "Scandit" to my project.
IDE: Visual studio Mac(Xamarin.Forms 4.6.0.726)
The following is the error message.
Attempting to gather dependency information for package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' with respect to project 'Modbusbutton3', targeting '.NETPortable,Version=v4.5,Profile=Profile78'
CACHE https://api.nuget.org/v3/registration5-gz-semver2/scandit.barcodepicker.xamarin/index.json
Total number of results gathered : 52
Gathering dependency information took 217.67 ms
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json - 5.27 ms
Attempting to resolve dependencies for package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Scandit.BarcodePicker.Xamarin.5.14.5.10'
Resolved actions to install package 'Scandit.BarcodePicker.Xamarin.5.14.5.10'
Found package 'Scandit.BarcodePicker.Xamarin 5.14.5.10' in '/Users/dej.pvi/Downloads/20200506-WiFi Solution for iOS/packages'.
For adding package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' to project 'Modbusbutton3' that targets 'portable45-net45+win8+wp8'.
Install failed. Rolling back...
Package 'Scandit.BarcodePicker.Xamarin.5.14.5.10' does not exist in project 'Modbusbutton3'
Executing nuget actions took 15.64 ms
Could not install package 'Scandit.BarcodePicker.Xamarin 5.14.5.10'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile78', 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.
Can any one help how to solve this? Thank you!
As I checked Scandit.BarcodePicker github sample they are using two different packages.
Scandit.BarcodePicker.Xamarin
This package is installed only in Android and iOS project.
Scandit.BarcodePicker.Unified
This package is installed in every project.
According to your log Target Framework of your project is PCL. You might consider to convert you project to .NETStandard 2.0, because this might be other issue why you are not able to install this package. Check the link here.

What are the differences between Framework and Package in Swift?

What are the differences between Framework and Package in Swift?
I knew about differences of swift embeddable components like,
Static Framework
Static Library
Dynamic Framework
Dynamic Library
But I do not know what is the purpose of the Swift Package?
When should I use Swift package?
In Swift, packages are reusable components of Swift, Objective-C, Objective-C++, C, or C++ code that developers can use in their projects. This is similar to packages in npm.
Packages are primarily distributed through Cocoa Pods, Swift Package Manager, and Carthage.
Packages can contain Frameworks and Libraries and can use other packages as dependencies.
You would use a package in Swift when you want to re-use a piece of code in different projects as you would an npm package in Javascript projects. An example would be NetworkUtils a package distributed on Cocoa Pods that provides networking support.
Packages are just a way to distribute code, like a framework or a library. The benefit comes from how easy it is to manage them. You can manage a list of the dependencies you want to include and the package manager will handle downloading and installing the code into your project for you. It also makes it easier to choose specific versions of packages to use in your project.
For example, if I want to include NetworkUtils in my project, I would just edit a Podfile (a Cocoa Pods file for managing dependencies) and would just add a line: pod 'NetworkUtils' and then run the pod install command in terminal and it would load the newest version of the package into my project.

FSharp.TypeProviders.Templates nuget for Type Provider development

I want to develop Type Provider.
Following tutorial you need to use FSharp.TypeProviders.SDK.
FSharp.TypeProviders.StarterPack nuget is deprecated, you need to use FSharp.TypeProviders.Templates instead.
So I created F# library project and added this nuget.
But I get the following error:
Package 'FSharp.TypeProviders.Templates 5.2.0' has a package type
'Template' that is not supported by project 'fsharplib'.
I tried different F# libraries: Standard, Core or Full Framework with the same result.
How I can use FSharp.TypeProviders.Templates for building Type Provider?
FSharp.TypeProviders.Templates is not a library package, it's a dotnet template: you use it to create a type provider solution.
To install it, run this in a console: dotnet new -i FSharp.TypeProviders.Templates
Then, to create a type provider solution, run: dotnet new typeprovider -o <project_name>
Unfortunately nuget.org doesn't recognize these types of packages, so it gives incorrect instructions.

Can't load nuget package written with .NET Core

I have recently attempted to migrate my open source project GeographicLib.FSharp (https://github.com/SpiegelSoft/GeographicLib) to .NET Standard. I can build the project, package it and upload it to nuget, but when I try to load the nuget package into an external .NET Standard Library, I obtain mixed results.
Creating an F# library using dotnet new classlib -lang f# and adding the Nuget package via Visual Studio works on the face of it, but I cannot access any of the types I defined in the GeographicLib.FSharp library.
If I create a C# .NET Standard library using the Class Library (.NET Standard) template, then upgrade this package to .NET Standard 1.6, I can add the GeographicLib.FSharp nuget package and access the types as normal.
It appears that importing types from Nuget packages in F# .NET Standard Libraries is broken.
Is there a fix or a workaround for this?
Visual Studio F# extension doesn't yet support .NET Standard or .NET Core projects.
See https://blogs.msdn.microsoft.com/dotnet/2017/08/14/f-and-net-core-roadmap-update/ for more info and roadmap
If you think is an issue, please open a bug in Visual F# repository https://github.com/Microsoft/visualfsharp/issues
These project build, but doesnt load intellisense in Visual Studio.
Meanwhile you can use other ide/editors, like:
Visual Studio Code with Ionide extension
JetBrains Rider
vim
emacs
Visual Studio for Mac

Dart library / package keyword meaning?

Is Dart library exactly the same Java package ?
Is Dart package exactly the same Java library (JAR) ?
A package is a set of libraries which can for example be deployed to pub.dartlang.org. I guess this is similar to a jar file.
A library is one Dart script file with or without a name (or a set of Dart script files with part/part of) and is the boundary for privacy. Private members are only visible or accessible from within the same library.

Resources