- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
它正在尝试为 Xamarin.Forms 创建 TypeProvider,但一直受到 FS2024 错误的困扰。
`F#
type MainPage = Moonmile.XamarinFormsTypeProvider.XAML<"MainPage.xaml">
// made btn1 and text1 propertis
type MainPageEx(target:MainPage) =
let mutable count = 0
do
// When set event to btn.Clicked, happen FS2024 error.
// If this event is comment out, it success build.
target.btn1.Clicked.Add( fun e ->
count <- count + 1
target.btn1.Text <- "Clicked " + count.ToString())
// Property is success
member this.CurrentPage
with get() = target.CurrentPage
当您指的是属性时,通常可以构建和操作。但是Xamarin.Forms的内部类如Button.Clicked,如果尝试访问,就是构建错误。
错误代码示例 https://github.com/moonmile/SimpleEventTypeProvider
为 XamarinFormsTypeProvider 编写代码github.com/moonmile/XamarinFormsTypeProvider
也许,我怀疑在生成 Native TypeProvider 和 Xamrin.Forms.Core PCL 的过程中会出现不一致的情况。
F# Compiler for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License my error!!!
isMscorlib: true
name: "System.Runtime"
PrimaryAssembly.DotNetCore.Name: "System.Runtime"
PrimaryAssembly.Mscorlib.Name: "mscorlib"
parameter error FS2024: Static linking may not use assembly that targets different profile.
这是为了操作它们正常工作的属性,也许是为了 MVVM。但是我正在尝试实现一种分配给 Button.Clicked 事件的方法如果可能的话,如类似代码隐藏的建筑物所示。
有解决办法吗?
就 WPF 中的 XAML 而言,这样的效果如何?github.com/fsprojects/FsXaml
最佳答案
这个答案不能保证是正确的,但它至少应该帮助您指出正确的方向。
要做的第一件事是确保您已安装最新的 Visual F# Tools Build,因为这会添加与 PCL 配置文件兼容的 FSharp.Core(您可以在此处找到它:( https://visualfsharp.codeplex.com/ )。安装后,您将需要引用 Profile78 或 Profile259 FSharp.Core.dll(在我的计算机上,这些位于:“C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp .NETPortable\2.3.5.0”和“C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp.NETPortable\2.3.5.1”分别)。
安装完成后,下一步要做的就是确保您的 PCL 项目在其项目文件中包含以下内容(这告诉 MSBuild/xBuild 这些项目是 PCL 库,并且它们是 F# 项目):
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{F2A71F9B-5D33-465A-A702-920D77279786}</ProjectTypeGuids>
完成后,您将需要选择 Profile78 或 Profile259(我建议选择 78,因为当前的 Xamarin.Forms nuget 包不支持 259)。
完成后,您应该能够构建并运行,并且应该消除错误。
关于f# - FS2024 TypeProvider 使用 PCL 项目时出现静态链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25175031/
我想在可移植的 C# 类中实现这个逻辑: static JsonWebToken() { HashAlgorithms = new Dictionary>
我有一个线程可以在处理点云时将其可视化。我还需要可视化法线,我该如何更新它们? 我找不到像普通云的 updateClouds 这样的东西。 void pclVisualizerThread::oper
下面的函数没有产生结果。换句话说,点云中的点数与降采样前完全相同。我尝试了从 0.01 一直到您在下面看到的那些不同的叶子大小数字,但它们都产生相同的结果。我不得不对从 pcl::PointCloud
我是 PCL 的新手。我正在使用 PCL 库,我正在寻找一种从点云中提取点或将特定点复制到新点的方法。我想验证每个点是否符合条件,我想获得一个只有好的点的点云。谢谢! 最佳答案 使用 ExtractI
我更新到了最新版本的 Xamarin,其中“完全支持”PCL。我现在如何使用 Azure 移动服务? 如果我创建 PCL 库并尝试使用 NuGet 添加它,则无法安装“Newtonsoft.Json
创建 C# Xamarin Forms 应用 添加 C# PCL 添加 F# PCL 尝试添加从 C# PCL 到 F# PCL 的引用 -> 在引用对话框中您将看到:不兼容的框架定义::NETFra
我现在正在使用一些 Laserscans,并希望在 C++ 中对 PointClouds 进行下采样。我在构建过程中遇到了一个奇怪的问题,我认为在我尝试编译代码时的库链接过程中。这里是问题似乎来自的最
我想知道这是否可能。我有一个功能: pcl::PointCloud createPointCloud(std::Vector input) 返回一个点云。我想知道是否可以获取这个点云,并制作一个指向
我正在尝试使用点云库提供的 RANSAC 方法估计通过点云点的线。我可以创建对象,并毫无问题地估计线模型,如下所示: pcl::PointCloud::ConstPtr source_cloud(ne
正在尝试使用 PCL为 mvvmcross使用 Profile 78 的 TPL (关于问题 TPL on PCL of mvvmcross) 上 iOS项目正在运行,但不适用于 android .
我使用以下命令安装了 PCL。 sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl sudo apt-get updat
PCL库中是否有任何函数可以保存pcl::PointCloud可以用Meshlab打开的XYZRGB格式的点云? 好像pcl::io::savePCDFileASCII (filename, clou
我正在尝试使用 PortableRest从 Xamarin Forms 对 Web API 2.2 Rest 服务进行异步调用。 我想我遇到了某种死锁/同步上下文问题,但我无法解决(新手到异步等)。
我正尝试在 C++ 中运行以下命令: #include #include "pcl/pcl_base.h" #include "pcl/PointIndices.h" #include "pcl/c
在 .NET 标准 PCL 项目中,我想引用一个针对配置文件 111 (lib\portable-win8+net45+wpa81+MonoAndroid+Xamarin.iOS10) 的私有(pri
我想使用 PCL 加载点云数据。我可以在教程中正确加载示例数据,但是当我尝试使用我的数据时,pcd 文件的值被更改为非常小的值。 终端输出图像 实际值类似于 3603538.71629,但当 PCL
我在创建 F# 可移植项目时遇到问题,该项目应该从 C# 可移植项目中引用。添加此类引用时,会出现以下消息: Unable to add a reference to 'PortableLibrary
操作系统:Ubuntu20.04 PCL信息: Package: libpcl-dev Version: 1.10.0+dfsg-5ubuntu1 Priority: extra Section: u
我想删除 SQLite.Net-PCL打包并想使用sqlite-net-pcl因为我后来发现SQLite.Net-PCL官方没有维护。 我的 Xamarin 项目中有一些表将 GUID 存储为字符串类
我有一些代码如下所示: typedef pcl::PointXYZRGB pcl_ColorPointType; typedef pcl::PointXYZ pcl_PointType; typede
我是一名优秀的程序员,十分优秀!