def METHOD_NAME(ctx, extra_srcs, extra_deps):
    stdrefs = [ctx.attr._stdrefs] if ctx.attr.include_stdrefs else []
    providers = {}
    for tfm in ctx.attr.target_frameworks:
        if is_standard_framework(tfm):
            fail("It doesn't make sense to build an executable for " + tfm)
        providers[tfm] = AssemblyAction(
            ctx.actions,
            additionalfiles = ctx.files.additionalfiles,
            analyzers = ctx.attr.analyzers,
            debug = is_debug(ctx),
            defines = ctx.attr.defines,
            deps = ctx.attr.deps + extra_deps + stdrefs,
            keyfile = ctx.file.keyfile,
            internals_visible_to = None,
            internals_visible_to_cs = None,
            langversion = ctx.attr.langversion,
            resources = ctx.files.resources,
            srcs = ctx.files.srcs + extra_srcs,
            out = ctx.attr.out,
            target = "exe",
            target_name = ctx.attr.name,
            target_framework = tfm,
            toolchain = ctx.toolchains["@d2l_rules_csharp//csharp/private:toolchain_type"],
        )
    fill_in_missing_frameworks(ctx.attr.out, providers)
    result = providers.values()
    dependency_files_list = _copy_dependency_files(ctx, result[0])
    runtimeconfig = write_runtimeconfig(
        ctx.actions,
        ctx.file.runtimeconfig_template,
        result[0].out.basename.replace("." + result[0].out.extension, ""),
        result[0].actual_tfm,
    )
    data_runfiles = [] if ctx.attr.data == None else [d.files for d in ctx.attr.data]
    shell_file = _generate_execution_script_file(ctx, result[0])
    direct_runfiles = [result[0].out, result[0].pdb]
    if runtimeconfig != None:
        direct_runfiles.append(runtimeconfig)
    result.append(DefaultInfo(
        executable = shell_file,
        runfiles = ctx.runfiles(
            files = direct_runfiles,
            transitive_files = depset(dependency_files_list, transitive = data_runfiles),
        ),
        files = depset([result[0].out, result[0].prefout, result[0].pdb, shell_file]),
    ))
    return result