我正在尝试在 VSTS 管道中部署 Azure ARM 脚本。
我在构建步骤中“发布”了工件并在发布步骤中下载了工件。日志似乎表明它找到了ARM脚本(经过多次反复试验。这里找到的规定方式似乎根本不起作用)。
但是我收到错误:找不到与模板文件模式匹配的任何文件
顺便说一句,即使找不到文件,我也会收到此错误(这是有道理的..但当它确实找到文件时不会)。当我在 Azure 门户中手动部署时,ARM 脚本会正确部署。
我在发布管道中使用Azure 资源组部署步骤。
我不确定还有哪些其他信息可以帮助解决此问题,但请求并希望我可以将其提供给您。
谢谢
2018-12-14T18:32:06.6009951Z ##[section]Starting: Azure Deployment:Create Or Update Resource Group action on ChrisGroup
2018-12-14T18:32:06.6015952Z
==============================================================================
2018-12-14T18:32:06.6016124Z Task : Azure Resource Group
Deployment
2018-12-14T18:32:06.6016287Z Description : Deploy an Azure resource manager (ARM) template to a resource group. You can also start, stop, delete, deallocate all Virtual Machines (VM) in a resource group
2018-12-14T18:32:06.6016444Z Version : 2.141.4
2018-12-14T18:32:06.6016526Z Author : Microsoft Corporation
2018-12-14T18:32:06.6016655Z …Run Code Online (Sandbox Code Playgroud) 我试图使用泛型来减少我的代码库,但遇到了这种情况。我似乎无法成功创建一个谷歌查询来表达我想要做的事情。
本质上,我传入一个泛型来创建一个List<T>,然后将它传递List<T>给一个需要一个List<SpecificClass>
我的 JSONUser 类
public class JSONUser
{
public string DocumentId { get; set; }
[JsonProperty(PropertyName = "UserName", Required = Required.Always)]
public string UserName { get; set; }
[JsonProperty(PropertyName = "FirstName", Required = Required.AllowNull)]
public string FirstName { get; set; }
[JsonProperty(PropertyName = "LastName", Required = Required.AllowNull)]
public string Lastname { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
假设有一个类 JSONCompany,其中包含类似公司的字段。
主要代码:
static void CollectUserData()
{
boolean j = GetJSON<JSONUser>();
boolean k = GetJSON<JSONCompany>();
...
}
static boolean …Run Code Online (Sandbox Code Playgroud) 将 angular2 与 @ngx-translate 模块一起使用
我编码根据用户选择进行语言更改并使用以下方法设置语言:
this.translate.use('en');
Run Code Online (Sandbox Code Playgroud)
在其他组件的其他地方,我使用 .get observable 来检索一些标签。
this.translate.get(element.bucketId.toUpperCase()).subscribe( x => { bucket.bucketLabel = x; } );
Run Code Online (Sandbox Code Playgroud)
当前语言的初始标签加载正常,但是当执行 .use 时,标签不会更改为新语言。可观察对象不会触发。
为了解决这个问题,我必须执行以下操作:
this.translate.get(element.bucketId.toUpperCase()).subscribe( x => { bucket.bucketLabel = x; } );
this.translate.onLangChange.subscribe( event => {
bucket.bucketLabel = this.translate.instant(element.bucketId.toUpperCase());
});
Run Code Online (Sandbox Code Playgroud)
这显然显得过分了。
使用管道和指令的代码可以完美地切换语言。
我误解了 .get 的作用吗?或者在进行语言切换时我还缺少其他什么技巧。不仅仅是做一个 this.translate.use(lang);