配置环境变量以解决运行蛋糕脚本时版本不匹配的问题

问题描述 投票:1回答:1

我是蛋糕脚本的新手。我正在尝试运行已经开发的现有蛋糕脚本。错误后抛出。

Cake.exe : Error: The assembly 'MagicChunks.Cake, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' 
At line:1 char:1
+ & "Y:\Source\Repos\CI\tools\Cake\Cake.exe" "build.cake" -target="Defa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error: The asse...KeyToken=null' :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

is referencing an older version of Cake.Core (0.23.0). 
This assembly must reference at least Cake.Core version 0.26.0. 
Another option is to downgrade Cake to an earlier version. 
It's not recommended, but you can explicitly opt out of assembly verification 
by configuring the Skip Verification setting to true
(i.e. command line parameter "--settings_skipverification=true", 
environment variable "CAKE_SETTINGS_SKIPVERIFICATION=true", 
read more about configuration at https://cakebuild.net/docs/fundamentals/configuration)

有人可以告诉我在哪里必须配置环境变量以避免上述错误?

.net powershell webforms asp-classic cakebuild
1个回答
0
投票

这不是环境变量问题。 MagicChunks.Cake正在获取特定版本的程序集,但正在查找较旧的版本。

升级您的Cake版本...

https://www.nuget.org/packages/Cake/0.26.0

© www.soinside.com 2019 - 2024. All rights reserved.