Open glen-nicol opened 5 years ago
#tool
preprocessor only downloads tool, but doesn't reference assembly, so issue likely manifests itself because presence of tools lets code come further.
By inspecting your log it doesn't seem like Cake.Squirrel
is being loaded but Cake.CustomAddin, Version=1.0.0.0
.
I don't understand what you mean by "lets code come further".
As for the absense of Cake.Squirrel. Cake.CustomAddin references Cake.Squirrel as a nuget package. Not sure if that is acceptable but we are writing an addin to make it easy to do some builds internally that require squirrel so it made sense to reference the other addin directly in a common a function. Thus far we haven't had any issues doing so. Except for the conflict with the #tool
directive.
I was able to work around the problem by adding Squirrel.Windows to the tools' directory package.config file. Which leads me to believe that cake does in fact do some sort of extra execution/reference when loaded by that directive.
What You Are Seeing?
When I include the tool for Cake.Squirrel
along with my own custom addin that depends on System.IO.Compression I end up getting a MissingMethodException for the System.IO.Compression.ZipFile.OpenRead method. I believe there is a known historical problem with that function missing from the net46 dll. Somehow including that tool (which is a C# nuget package with assembly references for integrating squirrel with a .net app along with the exe's) messes with the assembly resolution when running the script.
if I remove that tool directive I can execute the ZipFile.OpenRead function but then the cake.squirrel calls error because the tool is missing. I suppose I can move the tool installation to the bootstrapper but I also thought I heard the plan was to not need the bootstrapper in the future?
What is Expected?
I expect tools to just download and install the exes in the tools directory and not reference the assemblies. If I wanted those I would list it as an addin.
What version of Cake are you using?
Version 0.30.0+Branch.main.Sha.cab58db40b02346e562531be27fcaa5ea51a3312
Are you running on a 32 or 64 bit system?
64bit
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
Nope
How Did You Get This To Happen? (Steps to Reproduce)
The first paragraph describes my problem.
Output Log