最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to make a library usable from dotnet AND fable if conditional statements are required - Stack Overflow

programmeradmin2浏览0评论

I have a library that has a single point where I need to distinguish the js backend from the dotnet bcl:

Regex in dotnet uses the \G switch where javascript uses the sticky flag which is not available in dotnet.

I found not any way to conditionally switch between the 2 code parts that allow that (using jsnative).

I tried to multitarget the library for net9 and netstandard2.0 but then the fable project that references the shared library complains that the shared library (also) targets net 9.

So how can I share a library and have conditional code (for fable and dotnet) in that library?

I also tried to just share the files of the library. That caused other problems: When the files are not below the project apparently inclusion of Fable.Core no longer works, this is a weird thing in its own.

发布评论

评论列表(0)

  1. 暂无评论