我是FAKE的新手,我尝试使用虚假作为持续投放,但我遇到了部署.nupkg
文件的问题。这是我的DeployPackage目标的代码
Target "DeployPackages" (fun _ ->
deployProjects
|> Seq.iter (fun projName ->
deploymentMachines
|> Seq.iter (fun machineUrl ->
let package = Directory.GetFiles(deployDir, projName + "*.nupkg").FirstOrDefault()
if package = String.Empty
then failwith "No packages was found. You should get green build before deployment."
else
package |> deployToMachine(machineUrl)
)
)
)
在TeamCity构建日志中我看到错误:
"完成目标:CreateDeploymentPackage 启动目标:DeployPackages(==> CreateDeploymentPackage,CreateDeploymentPackage)
目标:DeployPackages .. \生成\输出\部署\ MySitev2.65.nupkg"
然后出现下一条错误消息" Newtonsoft.Json.JsonSerializationException:
找不到名称为'消息'的联合类型。路径' case',第2行,第20位。
at Newtonsoft.Json.Converters.DiscriminatedUnionConverter.ReadJson(JsonReader reader,Type objectType,Object existingValue,JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter,JsonReader reader,Type objectType,Object existingValue)
[15:35:09] [步骤2/2]在Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader,Type objectType,Boolean checkAdditionalContent)
[15:35:09] [步骤2/2]在Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value,Type type,JsonSerializerSettings settings)
在Newtonsoft.Json.JsonConvert.DeserializeObject [T](字符串值,JsonSerializerSettings设置)
在D:\ code \ fake \ src \ app \ Fake.Deploy.Lib \ FakeDeployAgentHelper.fs中的Fake.FakeDeployAgentHelper.processResponse(Byte []响应):第120行"
我的目标有什么问题?