Skip to content

Ability to pass custom flag to build command #1395

@kunalspathak

Description

@kunalspathak

I am trying to build and run BenchmarkDotNet and micro benchmarks on windows arm64 but because of dotnet/roslyn#42393 I need to pass /p:DebugType=portable to build the micro benchmark project. However when I run micro benchmarks on windows ARM64 it triggers build for specific benchmark and it doesn't include the required flag resulting in build failure that looks like this:

Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) Build Engine version 16.6.0-preview-20126-02+13cfe7fc5 for .NET Core

// Build Error: Standard output:

 Standard error:
 Time Elapsed 00:00:07.61
    1 Error(s)
    0 Warning(s)
CSC : error CS0041: Unexpected error writing debug information -- 'An attempt was made to load a program with an incorrect format. (0x8007000B)' [D:\Users\dotnet-bot\kpathak\git\performance\artifacts\491570be-f187-4959-8673-8c70cdf2beb9\BenchmarkDotNet.Autogenerated.csproj]
Build FAILED.

Exposing a way for user to pass whatever switch they want depending on their environment will allow the build to work properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions