[英]How to addin specific package if cake running in windows
ITNOA ITNOA
I have cake file that I want to run in Windows and Ubuntu.我有我想在 Windows 和 Ubuntu 中运行的蛋糕文件。
In Windows we need Cake.EntityFramework addin
and in Ubuntu we do not need it.在 Windows 中我们需要 Cake.EntityFramework addin
而在 Ubuntu 中我们不需要它。
So I want to write some platform specific addin
like below所以我想写一些平台特定的addin
如下所示
#if WINDOWS
#addin nuget:?package=Cake.EntityFramework&version=0.3.0
#endif
But I do not know how to do it?但是我不知道该怎么做?
Cake pre-processing for #addin
, #tool
, #load
, #module
, etc. does not support conditionals ( #if
). #addin
、 #tool
、 #load
、 #module
等的 Cake 预处理不支持条件 ( #if
)。 I'd suggest splitting your Cake files to multiple, one windows.cake
, one linux.cake
and one shared.cake
.我建议将您的 Cake 文件拆分为多个,一个windows.cake
,一个linux.cake
和一个shared.cake
。 You can load shared logic using the #load
directive.您可以使用#load
指令加载共享逻辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.