Open klabranche opened 8 years ago
Yes, this is by design. A preprocessor directive in Cake should be on it's own line.
understand that it is an easy thing to fix but I was really thrown when one worked with a comment and another did not until I realized it was the construction of the comment as described was causing the failure. Simple enough to avoid but I was thrown for quite a bit. Perhaps a note should be mentioned somewhere in the docs for this?
And thank you for your awesome work on Cake! :-)
Correction, the particular error(s) you're seeing is not by default, but preprocessors are processed before sent to Roslyn/Mono compiler so they know nothing of C#. So it's by design in the way that you shouldn't put anything else on a preprocessor directive line.
just hoping to save someone else from hitting this and like me taking too long to figure out what is wrong... :-)
Thank you! Didn't see your previous comment until now (answered on my phone) :smile:
We could definitely make the preprocessor parsers more strict which would remove any future confusion. Let's keep the issue open so we don't forget it.
Thanks!
Y'all are awesome! Keep up the great work!
What You Are Seeing?
When I construct my addin directive with a comment that is a hyperlink and it immediately follows the // and is on the same line as the #addin and uses the package name only like below:
Produces the following command line messages:
If the comment is not a hyperlink OR does not immediately start as a hyperlink in the comment, it works.
Move the comment above the #addin directive, works.
If I use the longer version of the directive that gives the package URI with the comment on the same line it works.
What version of Cake are you using?
0.17.0
Are you running on a 32 or 64 bit system?
64 bit
What environment are you running on? Windows? Linux? Mac?
Windows 7
Are you running on a CI Server? If so, which one?
Not yet. :-)
How Did You Get This To Happen? (Steps to Reproduce)
using a build.cake constructed like:
with just build task that runs MSBUILD and executed as .\build.ps1 -t build
Output Log
Using the diagnostic logging level produces:
Output:
With the diagnostic level turned on the command line also produces: