在 Azure DevOps“发布管道”中,我提供 Azure 资源(包括 SQLServer 数据库)并尝试使用托管标识配置对数据库的访问。
在确保 DevOps 服务主体是定义为数据库服务器的 AAD 管理员的 AAD 组的成员后,我需要运行一些 SQL 来添加托管身份用户并更改角色。这是在 Azure Powershell 任务中使用Invoke-Sqlcmdcmdlet尝试的。
Invoke-Sqlcmd有两种口味,我不清楚我应该使用哪一种以及是否重要。到目前为止,我尝试的所有内容都未能通过 AAD 进行身份验证。
如何将我使用 AAD 身份验证的意图传达给Invoke-Sqlcmd?
我需要先Connect-AzureAD吗?
如果我需要传递一个System.Management.Automation.PSCredential对象,鉴于我们正在处理服务主体(Azure DevOps 服务用户),我应该使用什么作为用户和密码?
powershell azure-powershell azure-active-directory azure-sql-database azure-devops
考虑以下基本情况:
Mapper.CreateMap<FromBase, ToBase>()
        .Include<FromD1, ToD1>()
        .Include<FromD2, ToD2>();
Mapper.CreateMap<FromD1, ToD1>()
        .ForMember( m => m.P0, a => a.MapFrom( x => x.Prop0 ) )
        .ForMember( m => m.P1, a => a.MapFrom( x => x.Prop1 ) );
Mapper.CreateMap<FromD2, ToD2>()
        .ForMember( m => m.P0, a => a.MapFrom( x => x.Prop0 ) )
        .ForMember( m => m.P2, a => a.MapFrom( x => x.Prop2 ) );
Mapper.AssertConfigurationIsValid();
FromBase[] froms = {
        new FromD1() { Prop0 = 10, Prop1 = 11 },
        new FromD2() { Prop0 = 20, …Run Code Online (Sandbox Code Playgroud) 我有一个plugin P扩展和application A(.NET40),我无法控制。
P 程序集 (.NET40) 有一个shared dependency D(.NET35)。  
P 和 D 都依赖于 FSharp.Core,但版本不同:
P编译针对FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
D编译针对FSharp.Core, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a  
只部署了 FSharp.Core, Version=4.4.0.0 并且我订阅了 AppDomain.AssemblyResolve 来加载部署的程序集。
当我在 GAC 中安装了两个 FSharp.Core 版本的机器上进行测试时,它们最终都加载了插件。
我的理解是绑定重定向将是这里的解决方案,但如何在不访问 app.config 的情况下完成它?
.net plugins f# assembly-resolution assembly-binding-redirect
FsXaml似乎仅适用于至少面向.NET 4.5的项目.
它有一种方法来使用它同时针对.NET 4.0?
如果是这样我怎么能实现这个目标?
f# ×2
.net ×1
automapper ×1
azure-devops ×1
c# ×1
fsxaml ×1
plugins ×1
polymorphism ×1
powershell ×1