DllMapDemo Why do you use Assembly? But I want to use NativeAOT then it happens cause Assembly doesn't work for NativeAOT

未关闭
#6,981 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
csharp

调研方向

从 DllMapDemo 示例开始,检查 native 目录以及其中的测试或运行说明。跟踪 XML 映射的读取方式和当前操作系统的选择方式,然后确定 NativeAOT 在不使用 Assembly 或 Marshal 的情况下能够支持哪些内容。当示例文档中的 NativeAOT 路径能够处理特定于操作系统的映射,并在 .NET 8 上成功运行时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Before you open an issue

If the issue is:
DllMapDemo
That is why Assembly and Marshal can't be successful for NativeAOT.

Issue description
Check out:
If I ran test from directory native
image

[<]Problem replacement with string as path to XML and read it.]

Target framework
Net 8.x

Check the .NET target framework(s) being used, and include the version number(s).

  • .NET Core
  • .NET Framework
  • .NET Standard

How do I pass current operating system if I use like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<dllmap dll="libglib2" os="Windows" target="libglib-2.0-0"/>
	<dllmap dll="libglib2" os="Linux" target="libglib-2/>
	<dllmap dll="libglib2" os="MacOS" target="libglib-2.0"/>
</configuration>

I need to know without Assembly in NativeAOT support. Thanks!

主要语言
C#
星标
3.7k
派生
5.1k
平均合并
19 小时 47 分钟
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotnet/samples 的其他 Issue

查看 dotnet/samples 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。