unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.63k stars 697 forks source link

Publishing wasm failed with dependency injection #15947

Open wch1618 opened 3 months ago

wch1618 commented 3 months ago

Current behavior

If project created without dependency injection, the project will published successfully, otherwise failed with error: CSC (0,0): Error CS2012: Unable to open 'xxx. Wasm. dll' for writing -- 'The file' xxx. Wasm. dll 'is currently in use by another process and therefore cannot be accessed by that process.' (source message : CSC(0,0): 错误 CS2012: 无法打开“xxx.Wasm.dll”进行写入 --“文件“xxx.Wasm.dll”正由另一进程使用,因此该进程无法访问此文件。”) I am very certain that none of my other processes have opened that file.

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

Uno.Extensions.Hosting.WinUI 4.0.0

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

17.9.3 17.9.4

Relevant plugins

No response

Anything else we need to know?

vs extension of uno platform is 5.1.22.4 uno-check pass

jeromelaban commented 3 months ago

Thanks for the report. Can you provide a repro sample?