C
C#3mo ago
Halfbax

Publish Failure of Class Library with WinAppSdk dependency

I have added a class library that references WinAppSDK. Now I am unable to publish my program. I don't encounter any errors while building, only while publishing.
Cannot resolve Assembly or Windows Metadata file 'I:\projects\Name\Shared\Name.Core\bin\Debug\net8.0-windows10.0.22621\win-x64\Name.Windows.Core.dll'
Cannot resolve Assembly or Windows Metadata file 'I:\projects\Name\Shared\Name.Core\bin\Debug\net8.0-windows10.0.22621\win-x64\Name.Windows.Core.dll'
Does the class library require any specific files, such as an app.manifest, to run since I have referenced WinAppSdk?
1 Reply
Halfbax
Halfbax3mo ago
I added the flag to publish WinAppSdk in self-contained mode in the .csproj of the class library. Now I'm encountering the error:
error : The platform 'AnyCPU' is not supported for Self Contained mode.
error : The platform 'AnyCPU' is not supported for Self Contained mode.
This issue is puzzling because the platform is indeed set to win-x64.