bytecodealliance / bytecodealliance/componentize-dotnet

Error when running in Visual Studio

未关闭
#76 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
147
派生
18
PR 合并指标
30 天内没有已合并 PR

描述

With the following csproj file:

```



```
I can build using dotnet build at the command line (or terminal in VS Code), but in Visual Studio, I get the following error:

```
Failed to restore C:\repo\componentize-dotnet-demo\componentize-dotnet-demo\Ais.Net.Receiver.Host.Wasi\Ais.Net.Receiver.Host.Wasi.csproj (in 781 ms).
NuGet package restore failed. Please see Error List window for detailed warnings and errors.
1>C:\Program Files\dotnet\sdk\9.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(237,5): error NETSDK1067: Self-contained applications are required to use the application host. Either set SelfContained to false or set UseAppHost to true.
1>Done building project "Ais.Net.Receiver.Host.Wasi.csproj" -- FAILED.
```

But if I add the following package in, it builds fine in Visual Studio:







贡献指南

打开贡献指南

调研方向

从显示的 .csproj 包引用开始,比较命令行 restore 与 Visual Studio restore,然后检查报告行中的 Microsoft.NET.RuntimeIdentifierInference.targets 以及 SDK 包的 restore/build 集成。当 Visual Studio 能够使用原始引用进行 restore 和 build,且不需要额外的 Microsoft.DotNet.ILCompiler.LLVM 更新时,即表示完成。

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

评估

技术栈
csharp, wasm
领域
build-system
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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