小编Mic*_*hal的帖子

从Visual Studio Team Services下载构建二进制文件

我在Visual Studio Team Services中有一个WPF项目.项目已成功构建,但我可以在哪里下载生成的文件?我只看到"下载日志"选项,但不是我的项目的实际构建.

在此输入图像描述

在此输入图像描述

2016-02-19T11:01:16.1495550Z Checking if artifacts directory exists: C:\a\1\a
2016-02-19T11:01:16.1505530Z Creating artifacts directory.
2016-02-19T11:01:16.1515540Z Checking if test results directory exists: C:\a\1\TestResults
2016-02-19T11:01:16.1515540Z Creating test results directory.
2016-02-19T11:01:16.1535549Z Creating binaries directory.
2016-02-19T11:01:16.2465543Z Starting: Get sources
2016-02-19T11:01:16.2595541Z Entering TfvcSourceProvider.PrepareRepositoryAsync
2016-02-19T11:01:16.2595541Z localPath=C:\a\1\s
2016-02-19T11:01:16.2595541Z clean=False
2016-02-19T11:01:16.2595541Z sourceVersion=C5
2016-02-19T11:01:16.2605525Z mappingJson={"mappings":[{"serverPath":"$/BuildTest","mappingType":"map","localPath":"\\"},{"serverPath":"$/BuildTest/Drops","mappingType":"cloak","localPath":"\\"}]}
2016-02-19T11:01:16.2625532Z Syncing repository: BuildTest (TFVC)
2016-02-19T11:01:16.2625532Z workspaceName=ws_1_1
2016-02-19T11:01:17.9893684Z Workspace Name: ws_1_1;Build\081c77d4-b575-42f7-b633-cce58ac8cb52
2016-02-19T11:01:18.1443685Z tf get /version:C5
2016-02-19T11:01:18.4623005Z Getting C:\a\1\s;C2
2016-02-19T11:01:18.4783037Z Getting C:\a\1\s\BuildProcessTemplates;C3
2016-02-19T11:01:18.4803012Z Getting C:\a\1\s\WpfApplication_Test;C5
2016-02-19T11:01:18.4823024Z Getting C:\a\1\s\BuildProcessTemplates\AzureContinuousDeployment.11.xaml;C3
2016-02-19T11:01:18.5023026Z Getting C:\a\1\s\BuildProcessTemplates\DefaultTemplate.11.1.xaml;C3
2016-02-19T11:01:18.5043058Z Getting C:\a\1\s\BuildProcessTemplates\LabDefaultTemplate.11.xaml;C4 …
Run Code Online (Sandbox Code Playgroud)

team-build azure-devops

16
推荐指数
1
解决办法
7357
查看次数

IdentityServer4 ASP.NET Core Identity 不会重定向回客户端

我有带有 Asp.Net Core Identity 的基本 IdentityServer4。重定向到登录页面并登录后,IdentityServer 不会将我重定向回客户端。

身份服务器配置:

 new Client
            {
                ClientId = "mvc",
                ClientName = "MVC Client",
                AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,

                ClientSecrets =
                {
                    new Secret("secret".Sha256())
                },

                RedirectUris = { "http://localhost:50309/signin-oidc" },
                PostLogoutRedirectUris = { "http://localhost:50309/signout-callback-oidc" },

                AllowedScopes =
                {
                    IdentityServerConstants.StandardScopes.OpenId,
                    IdentityServerConstants.StandardScopes.Profile,
                    "api1"
                },
                AllowOfflineAccess = true
            }
Run Code Online (Sandbox Code Playgroud)

IdentityServer 启动:

public void ConfigureServices(IServiceCollection services)
    {
        services.Configure<CookiePolicyOptions>(options =>
        {
            // This lambda determines whether user consent for non-essential cookies is needed for a given request.
            options.CheckConsentNeeded = context => true;
            options.MinimumSameSitePolicy …
Run Code Online (Sandbox Code Playgroud)

c# identityserver4 asp.net-core-identity

7
推荐指数
1
解决办法
3883
查看次数

WPF MVVM ListBox中的多个选择

我有一个包含文件名的ListBox.现在我需要从这个ListBox获取所选项目的数组.我在这里找到了一些答案,但它们都没有为我工作.我正在使用Caliburn Micro框架.

这是我的观点:

<Window x:Class="ProgramsAndUpdatesDesktop.Views.DeleteHistoryView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:ProgramsAndUpdatesDesktop.Views"
    mc:Ignorable="d"
    ResizeMode="CanResizeWithGrip"
    MaxWidth="300"
    MinWidth="300"
    MinHeight="500"
    Title="DeleteHistoryView" Height="500" Width="300">
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <RowDefinition Height="30" />
    </Grid.RowDefinitions>
    <StackPanel Grid.Column="0" Grid.Row="0">
        <ListBox x:Name="DeleteHistoryListBox" SelectedItem="{Binding Path=DeleteHistorySelectedItem}" 
                 ItemsSource="{Binding DeleteHistoryListBox, NotifyOnSourceUpdated=True}" 
             SelectionMode="Multiple">
        </ListBox>
    </StackPanel>
    <StackPanel Grid.Column="0" Grid.Row="1">
        <Button x:Name="DeleteHistoryButtonAction">Delete</Button>
    </StackPanel>
</Grid>
Run Code Online (Sandbox Code Playgroud)

这是我的ViewModel:

class DeleteHistoryViewModel : Screen
{
    string historyFolderPath = Environment.ExpandEnvironmentVariables(ConfigurationManager.AppSettings["HistoryFolderPath"]);

    private ObservableCollection<string> deleteHistoryListBox = new ObservableCollection<string>();
    public ObservableCollection<string> DeleteHistoryListBox
    {
        get { return deleteHistoryListBox; }
        set { deleteHistoryListBox …
Run Code Online (Sandbox Code Playgroud)

wpf listbox mvvm multipleselection caliburn.micro

6
推荐指数
1
解决办法
1万
查看次数

向温莎城堡注册 AutoMapper 5.1.1

我正在尝试向 CastleWindsor 注册 AutoMapper 5.1.1,但我不知道在哪里正确调用 Mapper.Initialize()。

自动映射器简介:

namespace AutoMapper_DI.Mappings
{
    public class WebMappingProfile : Profile
    {        
        public WebMappingProfile()
        {
          CreateMap<Person, PersonDTO>();            
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

温莎城堡注册:

class MainInstaller : IWindsorInstaller
{
    public void Install(IWindsorContainer container, IConfigurationStore store)
    {            
        container.AddFacility<TypedFactoryFacility>();

        container.Register(Component.For<IMapper>().UsingFactoryMethod(x =>
        {
            return new MapperConfiguration(c =>
            {
                c.AddProfile<WebMappingProfile>();
            }).CreateMapper();
        }));

        container.Register(Component.For<MainClass>());
    }
}
Run Code Online (Sandbox Code Playgroud)

然后当我使用 _mapper 时,出现 Mapper 未初始化异常:

class MainClass
{
    private readonly IMapper _mapper;

    public MainClass(IMapper mapper)
    {
        _mapper = mapper;
    }

    public void Start()
    {            
        Person p = new …
Run Code Online (Sandbox Code Playgroud)

c# castle-windsor automapper-5

5
推荐指数
1
解决办法
2380
查看次数

React Native - adb 无法安装 Exponent-2.6.4.apk

我第一次尝试 React Native,但在 AVD 上运行时遇到问题。在我的物理设备上,安装 expo 客户端应用程序并扫描二维码后,一切都可以无缝运行。但是当我尝试在 AVD 上运行该项目时,最终会出现错误Error running adb: adb: failed to install C:\Users\janam\.expo\android-apk-cache\Exponent-2.6.4.apk:

我尝试从 Expo.io 将 Exponent-2.6.4.apk 直接安装到 AVD 中,但它也以错误结束"There was a problem parsing the package"

任何建议..

android android-virtual-device react-native

5
推荐指数
1
解决办法
822
查看次数

IdentityServer4 Asp.Net 核心身份

我正在尝试使用 Asp.Net Core Identity 创建基本的 IdentityServer4,如教程中所示。

但是当我调用登录方法时:

return Challenge(new AuthenticationProperties { RedirectUri = "/Home/Index" }, "oidc");

我收到 404 错误:

http://localhost:5000/account/login?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Dmvc%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A44391%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520api1%26response_mode%3Dform_post%26nonce%3D636682993147514721.ZDA2MmI5ZTgtMWU3Yi00ZjMzLTkyODMtZjBiNWIzMjUzZTRjZmYxMjIxYWItOTk5NS00OGJlLWE0M2EtOTg3ZTYyM2EzZWVk%26state%3DCfDJ8D1ISazXjTpLmRDTOwhIeT5cVwo-oh7P4hDeZa0Q7cSfU6vKRDTEu3RHraTyz4Wb8oQngGo-qAkzinXV2yFJuqClVRB_1gwLLXIvVK4moxtgGjZUGUJIDmoqQHrQCOxGNJLrGkaBiS74vxd1el8N1wSseoSBlqZD94OlShI53wgPNKXPiDzT0FLOI47MNwHwzW0d5q0n752kZiVp2V31CZemI6wtaEgte3Mb9iouFzrSyAW5XaBMdDEnAGPCNZ2d5Zfgwb2Cmp61B-I9t05aDHqR-5cxYtr0PVVM6PwBKy-1olSFH8uIc8ku0UJn7PY0WA%26x-client-SKU%3DID_NETSTANDARD1_4%26x-client-ver%3D5.2.0.0

我需要任何额外的视图和控制器吗?我认为将使用 Asp.Net Core Identity 中的内容。

我的 IdentityServer4 配置:

 public void ConfigureServices(IServiceCollection services)
    {
        services.Configure<CookiePolicyOptions>(options =>
        {
            // This lambda determines whether user consent for non-essential cookies is needed for a given request.
            options.CheckConsentNeeded = context => true;
            options.MinimumSameSitePolicy = SameSiteMode.None;
        });

        services.AddDbContext<ApplicationDbContext>(options =>
            options.UseSqlServer(
                Configuration.GetConnectionString("DefaultConnection")));
        services.AddDefaultIdentity<IdentityUser>()
            .AddDefaultUI()
            .AddEntityFrameworkStores<ApplicationDbContext>();

        services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

        // configure identity server with in-memory stores, keys, clients …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-core identityserver4 asp.net-core-identity asp.net-core-mvc-2.1

4
推荐指数
1
解决办法
843
查看次数

Dapper 异步和事务

我试图弄清楚如何在交易中正确使用 Dapper。但我仍然认为我做错了什么。我发现的所有示例都没有使用异步。

有人可以建议我如何正确地做吗?

class DapperAsyncTransaction
{
    private readonly IDbConnection _dbConnection;
    private IDbTransaction _dbTransaction;

    private IDbConnection Connection => _dbTransaction.Connection;

    /// <summary>
    /// Constructor
    /// </summary>
    /// <param name="dbConnection"></param>     
    public DapperAsyncTransaction(
        IDbConnection dbConnection)
    {
        _dbConnection = dbConnection;
        _dbConnection.Open();
        _dbTransaction = _dbConnection.BeginTransaction();
    }

    public async Task Execute()
    {
        try
        {
            await Connection.ExecuteAsync(
            @"insert into Persons(Name, Surname) values" +
            "(@Name, @Surname)",
            param: new { Name = "John", Surname = "Doe" },
            transaction: _dbTransaction);


            _dbTransaction.Commit();
        }
        catch (Exception)
        {
            _dbTransaction.Rollback();
        }
        finally
        {
            _dbTransaction.Dispose();
            _dbTransaction …
Run Code Online (Sandbox Code Playgroud)

c# asynchronous transactions dapper

3
推荐指数
1
解决办法
6660
查看次数

WPF - ReactiveUI InvokeCommand 不起作用

我正在尝试学习 ReactiveUI,所以我正在制作示例应用程序,但我在使用InvokeCommand. 基本上每次SearchPhrase更改属性时都ShowSearchPhraseCommand应该调用我。

这是我的观点:

<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal"
    VerticalAlignment="Center" >


    <TextBox Width="100" Height="20" 
     Text="{Binding Path=SearchPhrase, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
Run Code Online (Sandbox Code Playgroud)

视图模型:

public ReactiveCommand ShowSearchPhraseCommand { get; private set; }

string _searchPhrase;
public string SearchPhrase
{
    get { return _searchPhrase; }
    set { this.RaiseAndSetIfChanged(ref _searchPhrase, value); }
}

public SecondViewModel(IScreen hostScreen)
{
    HostScreen = hostScreen;

    // Commands
    ShowSearchPhraseCommand = ReactiveCommand.Create(() => ShowSearchPhraseCommandHandler(SearchPhrase));

    // WhenAny
    this.WhenAnyValue(x => x.SearchPhrase).Where(x => !string.IsNullOrWhiteSpace(x)).InvokeCommand(ShowSearchPhraseCommand);
}

private void ShowSearchPhraseCommandHandler(string searchPhrase)
{
    Debug.WriteLine($"Phrase: {searchPhrase}"); …
Run Code Online (Sandbox Code Playgroud)

c# wpf reactiveui

2
推荐指数
1
解决办法
855
查看次数