cake icon indicating copy to clipboard operation
cake copied to clipboard

Cake --boostrap should uninstall and/or use same as specified in #module directive

Open devlead opened this issue 5 years ago • 3 comments

I updated a script from

#module nuget:?package=Cake.DotNetTool.Module&version=0.1.0

to

#module nuget:?package=Cake.DotNetTool.Module&version=0.2.0

--bootstrap installed the new version of the module, but the old one is still there

tools\modules
+---Cake.DotNetTool.Module.0.1.0
|   \---lib
|       \---netstandard2.0
\---Cake.DotNetTool.Module.0.2.0
    \---lib
        \---netstandard2.0

and the old being loaded and warnings still present even new available

- The assembly 'Cake.DotNetTool.Module, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null'
- is referencing an older version of Cake.Core (0.30.0).
- For best compatibility it should target Cake.Core version 0.33.0.
- Could not load module - '/tools/Modules/Cake.DotNetTool.Module.0.2.0/lib/netstandard2.0/Cake.DotNetTool.Module.dll'.

Expected behavior would be to load the new version.

Possible solutions would be to uninstall versions that don't match during bootstrap, load latest version of each module, find a way for assembly scanning to pick specified version.

@cake-build/cake-team thoughts?

devlead avatar Apr 09 '19 07:04 devlead

@devlead this seems like a good idea to me.

gep13 avatar Apr 09 '19 07:04 gep13

@gep13 @devlead Perhaps we can wait with this one until #2333 have been merged?

patriksvensson avatar Apr 09 '19 10:04 patriksvensson

@patriksvensson sure

devlead avatar Apr 09 '19 10:04 devlead