These are chat archives for chocolatey/ChocolateyGUI

23rd
Oct 2018
Andrew Stine
@astine
Oct 23 2018 18:57

Hello, This is my first time posting here so I've got a bit of a noob question: I'm trying to build the ChocolateyGUI source code but I keep bumping into a build error:

Chocolatey exited with 1
C:/Users/astine/Documents/Visual Studio 2017/Projects/ChocolateGUI/tools/Cake.Recipe.0.3.0-unstable0403/Content/tasks.cake(3,12): error CS0305: Using the generic type 'CakeTaskBuilder<T>' requires 1 type arguments
C:/Users/astine/Documents/Visual Studio 2017/Projects/ChocolateGUI/tools/Cake.Recipe.0.3.0-unstable0403/Content/tasks.cake(4,12): error CS0305: Using the generic type 'CakeTaskBuilder<T>' requires 1 type arguments
[...]
C:/Users/astine/Documents/Visual Studio 2017/Projects/ChocolateGUI/setup.cake(71,25): warning CS0618: 'CustomProjectParserResult.OutputPath' is obsolete: 'Use OutputPaths instead for multi-targeting support'
[...]
Error: Error(s) occurred when compiling build script:
C:/Users/astine/Documents/Visual Studio 2017/Projects/ChocolateGUI/tools/Cake.Recipe.0.3.0-unstable0403/Content/tasks.cake(3,12): error CS0305: Using the generic type 'CakeTaskBuilder<T>' requires 1 type arguments

I'm just downloading the code (through git) and running 'build.ps1' like it says in the readme file. Does anyone know what I'm doing wrong?

Gary Ewan Park
@gep13
Oct 23 2018 20:20
@astine can you please confirm that you have the most recent version of the Chocolatey GUI source code?
I recently made some changes that corrected an issue with the build process, and I thought everything was working correctly, at least the build worked correctly on AppVeyor, our Continuous Integration Server.
Andrew Stine
@astine
Oct 23 2018 20:28
I pulled it earlier today. I have the same problem whether I am in the develop branch or master.
It is the latest code. I pulled just before building each time.
Gary Ewan Park
@gep13
Oct 23 2018 20:35
This is very strange. You can see that the most recent CI build worked correctly here:
Can you confirm what Operating System you are running on?
Andrew Stine
@astine
Oct 23 2018 20:36
Windows 10.
Powershell version 5.1
Gary Ewan Park
@gep13
Oct 23 2018 20:37
Can you try running something for me...
Andrew Stine
@astine
Oct 23 2018 20:37
I can.
Gary Ewan Park
@gep13
Oct 23 2018 20:37
If you open a PowerShell Window at the root of the folder that has the checked out source code, and then run the following...
.\tools\Cake\Cake.exe --version
and confirm what version is being used
Andrew Stine
@astine
Oct 23 2018 20:40
Version 0.25.0+Branch.main.Sha.05b4d3f596defbdf5baecdb3712c9bc17f849b55
Gary Ewan Park
@gep13
Oct 23 2018 20:41
Hmm, ok, so that is the problem, but I am confused as to what is going on :-(
Andrew Stine
@astine
Oct 23 2018 20:41
What version should it be?
Gary Ewan Park
@gep13
Oct 23 2018 20:41
Can you open the tools/packages.config file and tell me what version it says in there?
Andrew Stine
@astine
Oct 23 2018 20:41
0.25.0
Gary Ewan Park
@gep13
Oct 23 2018 20:42
I am assuming that you are on the develop branch here by the way
Andrew Stine
@astine
Oct 23 2018 20:42
No I am on the master branch.
Gary Ewan Park
@gep13
Oct 23 2018 20:42
can you switch?
Andrew Stine
@astine
Oct 23 2018 20:42
switched: Version 0.25.0+Branch.main.Sha.05b4d3f596defbdf5baecdb3712c9bc17f849b55
Gary Ewan Park
@gep13
Oct 23 2018 20:43
and in the tools/packages.config file?
Andrew Stine
@astine
Oct 23 2018 20:43
0.30.0 in the packages.config
Gary Ewan Park
@gep13
Oct 23 2018 20:44
I am not entirely clear on what is going on here, but I can tell you how to fix it.
Remain on the develop branch, and then go into the tools folder and delete everything except the packages.config file.
Andrew Stine
@astine
Oct 23 2018 20:44
I need to get version 0.30.0 of cake installed in the tool dir?
Gary Ewan Park
@gep13
Oct 23 2018 20:44
Then, run the ./build.ps1 again
You don't need to do anything, the ./build.ps1 will take care of that for you
Delete everything in the tools folder, except the packges.config file, and then run the build
the rest should be taken care of for you
Andrew Stine
@astine
Oct 23 2018 20:45
I'm running it.
Gary Ewan Park
@gep13
Oct 23 2018 20:45
:+1:
Andrew Stine
@astine
Oct 23 2018 20:47
Looks like it's working now. Thanks a lot. I don't know what I did wrong the first time.
Gary Ewan Park
@gep13
Oct 23 2018 20:48
The only reason that I can think this happened was that when you switched to the master branch, it downloaded 0.25.0, but when you switched back it should have re-downloaded the 0.30.0 version
I haven't actually tested switching between teh branches, but perhaps I need to test that
Andrew Stine
@astine
Oct 23 2018 20:51
Hmm. I think that you're probably right. I bumped into an issue when building in the develop branch which is why I switched to the master branch thinking that perhaps it was more stable. I guess that that was a mistake.
Gary Ewan Park
@gep13
Oct 23 2018 20:52
Out of interest, what was the issue when building the develop branch the first time?
For Chocolatey GUI, the master branch is where we merge to when doing a release, the develop branch has the most recent code.
Andrew Stine
@astine
Oct 23 2018 20:55
I wish I could recall.
Gary Ewan Park
@gep13
Oct 23 2018 20:55
ha ha :-D
Oh well, never mind
As long as it is working now
Andrew Stine
@astine
Oct 23 2018 20:55
It is working. Thanks. And it's good to know about your release process.
Gary Ewan Park
@gep13
Oct 23 2018 20:56
I will try to reproduce the problem when switching between branches, and if I see any issues, I will do what I can to resolve
Andrew Stine
@astine
Oct 23 2018 20:56
Good luck.
Gary Ewan Park
@gep13
Oct 23 2018 20:56
Thanks
Are you interested in helping out with Chocolatey GUI, or are you building locally for other interests?
Andrew Stine
@astine
Oct 23 2018 20:58
Mostly for other interests. I was trying to explore the code to figure out how you interacted with the Chocolatey repositories.
Gary Ewan Park
@gep13
Oct 23 2018 21:25
I see. Pretty much everything is done via the Chocolatey.Lib assembly, which is actually the same as how Chocolatey itself works