0

I use CAKE 0.21.1.0.

Here is the relevant snippet of code:

var teamCityLoggerZipFolderPath = @".\TeamCity\CustomLogger\VSTest.TeamCityLogger.zip";
var dllDestinationFolder = @"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions";

ZipAliases.Unzip(new FilePath(teamCityLoggerZipFolderPath), 
                 new DirectoryPath(dllDestinationFolder));

The idea is to unzip the folder and store its contents in dllDestinationFolder.

However, I keep seeing this error message:

There is no argument given that corresponds to the required formal parameter 'outputPath' of 'ZipAliases.Unzip(ICakeContext, FilePath, DirectoryPath)'

As far as I can see, I am calling the FilePath and DirectoryPath constructors correctly, as documented here and here. I also don't think I am invoking ZipAliases.Unzip erroneously.

What am I doing wrong?

devlead
  • 4,935
  • 15
  • 36
M.Y. Babt
  • 2,733
  • 7
  • 27
  • 49

1 Answers1

2

Unzip is available through the DSL as either a global method or an extension method to ICakeContext.

So you could just invoke it as Unzip or Context.Unzip, example:

var teamCityLoggerZipFolderPath = @".\TeamCity\CustomLogger\VSTest.TeamCityLogger.zip";
var dllDestinationFolder = @"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions";

Unzip(teamCityLoggerZipFolderPath, dllDestinationFolder);


Context.Unzip(teamCityLoggerZipFolderPath, dllDestinationFolder);
devlead
  • 4,935
  • 15
  • 36
  • Hi, thanks for your reply. I changed it to ``Context.Unzip``, but now I see the error message ``Error: One or more errors occurred.`` (Very useful, I know.) The same error message was displayed for ``Unzip`` as well. – M.Y. Babt Sep 22 '17 at 12:07
  • 1
    Try launching cake with diagnostic verbosity. https://stackoverflow.com/questions/38658660/how-to-enable-diagnostic-verbosity-for-cake – devlead Sep 22 '17 at 12:18
  • I corrected the errors and your suggested changes work fine now. – M.Y. Babt Sep 22 '17 at 13:29
  • 1
    Great that it got sorted the "One or more errors occurred" message is a regression and will be sorted in the next release to print the exception message. – devlead Sep 23 '17 at 14:12
  • That is great to hear. It is such an utterly useless error message that it makes my blood boil... – M.Y. Babt Sep 24 '17 at 07:06