PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, September 11, 2022

[FIXED] How to addin specific package if cake running in windows

 September 11, 2022     c#, cakebuild, cross-platform     No comments   

Issue

ITNOA

I have cake file that I want to run in Windows and Ubuntu.

In Windows we need Cake.EntityFramework addin and in Ubuntu we do not need it.

So I want to write some platform specific addin like below

#if WINDOWS
#addin nuget:?package=Cake.EntityFramework&version=0.3.0
#endif

But I do not know how to do it?


Solution

Cake pre-processing for #addin, #tool, #load, #module, etc. does not support conditionals (#if). I'd suggest splitting your Cake files to multiple, one windows.cake, one linux.cake and one shared.cake. You can load shared logic using the #load directive.



Answered By - bjorkstromm
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing