Closed MonDeveloper closed 3 years ago
Just adding another error that could bring more value to the analysis. Here the step to reproduce
C:\_Sources\_TFVC\CREApp\Main\src\Services\WFM> cake build.cake
Could not find any assemblies compatible with .NETFramework,Version=v4.5.
Error: Failed to install addin 'Cake.FileHelpers'.
Process terminated with code 1.
PS C:\_Sources\_TFVC\CREApp\Main\src\Services\WFM> .\build.ps1
Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Installing addins...
Compiling build script...
Executing custom setup action... Running tasks...
Executing task: DBG Finished executing task: DBG
Executing task: Default Finished executing task: Default
Executing custom teardown action... Finished running tasks.
Total: 00:00:00.0452377
Based on what was discussed here, I think the problem was that in one scenario (using the bootstrapper) addins were being added via the packages.config file, which were being resolved in the bootstrapper. When executing the task directly, which simply runs cake.exe, those addins were not being restored. Usage of the packages.config files for addins/tools/modules is not longer recommended, and therefore, I don't think there is additional work that is required here.
As such, I am going to go ahead and close out this issue.
I'm experiencing some strange behaviors, it seems CAKE perform differently when launched via PS Bootstrapper or via VS Task Runner (using the cake-vs extension).
Sometimes it uses an old version of the roselyn compiler (no c#6) and it won't compile the script because I use string interpolation
I guessed the proble is related to the version of the compiler (and the c# language def, of course) because at the position there is this string interpolation:
Sometimes it gives error about cake assemblies like this one:
Anyway, the strange part is that these problems occur ONLY using the cake-vs extension and never using the PS Bootstrapper (or the cake directly via command line). Furthermore, during some sunny day, also using the cake-vs extension it works fine, with no reason (apparently)
My build.cake it a very simple one, just a few line more than a "Hello World". I also double checked the file encoding, it's ok.
And, I repeat, using the PS bootstrapper everything work as expected, all the times.
I'm sorry I'm so vague but I'm no more on PC (writing on mobile) and I'll be disco for a couple of weeks.
Hope someone else matched this issue and found a workaround.