Reputation: 582
I have a desktop WPF application and its have the dependency of WPFToolkit binary. Currently I'm trying to convert WPF application to UWP using desktop bridge manual option.
referring the below option to do it,
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net
I got the below build issue,
Error MSB4018 The "GenerateResource" task failed unexpectedly. System.InvalidOperationException: Item named 'themes/luna.normalcolor.baml' of type 'System.IO.UnmanagedMemoryStream' cannot be added to the resource file because it is not serializable. at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, IResourceWriter writer) at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, String filename) at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFileOrDir) at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List
1 inputs, List
1 satelliteInputs,
if anybody faced the same issue, please reply.
Thanks
Upvotes: 1
Views: 132
Reputation: 831
This is a known issue.
Add the following to the first PropertyGroup of your csproj file.
<AppxGeneratePrisForPortableLibrariesEnabled>false</AppxGeneratePrisForPortableLibrariesEnabled>
Upvotes: 0
Reputation: 582
I used manual packaging to resolve the issue. referred the below link, https://social.msdn.microsoft.com/Forums/vstudio/en-US/41b07aef-b3e6-47fa-b5c6-a390af2e2194/uwp-desktop-bridge-embedding-dlls-in-appx-package?forum=wpdevelop
Upvotes: 1
Reputation: 462
From a little research i did, it seems that this style is not supported anymore, in fact, it is as old as Aero, even if you managed to bypass the error, the app wouldn't work.
Upvotes: 0