Comments (23)
Thanks for your suggestions.
@vladimp: I do not have a reference into such an assembly in the project. I have not checked namespaces though.
However, I tried removing files from the win32 folder until the error disappeared.
It could be multiple files can cause this, but after I have removed Prism.Wpf.dll (file version 6.1.0.0) the build was successful. If I add it again I get the following (very similar) build error. So it might be that this is not the only file that can cause that error:
Error MSB4018 The "GenerateResource" task failed unexpectedly.
System.InvalidOperationException: Item named 'interactivity/defaultpopupwindows/defaultnotificationwindow.baml' of type 'System.IO.UnmanagedMemoryStream' cannot be added to the resource file because it is not serializable.
...
Any ideas?
from desktopbridgetouwp-samples.
Hi Guys,
Thanks for your feedback and sorry for your experience.
We didn't abandon you, we are working on creating a detailed guidance for all projects variations so you will have a great experience.
Currently it is not supported in the VS out of the box.
if you are blocked on submitting your app to the store please shoot me an email - vladimp [at] Microsoft.
Thanks for the patience and great holidays!
Vlad
from desktopbridgetouwp-samples.
Hi vlad,
Thanks for the examples. I tried to port our WPF app using the DesktopBridgeToUWP example, however a rather cryptic error happens when building the JavaScript UWP project:
Error MSB4018 The "GenerateResource" task failed unexpectedly.
System.InvalidOperationException: Item named 'crashdialog.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, List'1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass, Boolean extractingResWFiles, String resWOutputDirectory)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List'1 inputs, List'1 satelliteInputs, List'1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass, Boolean extractingResWFiles, String resWOutputDirectory)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() myapp.Package C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets 1194
Any ideas what could cause such an error?
Btw. The example works fine on that machine and I am using VS 2017 RC. Also, if I go the full manual way (using makeappx) it does create an appx file.
from desktopbridgetouwp-samples.
I have some more diagnostics on that now. I enabled more verbose msbuild output:
--snip--
1>Target _GeneratePrisForPortableLibraries:
1> Using "RemovePayloadDuplicates" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.Build.AppxPackage.dll".
1> Task "RemovePayloadDuplicates"
1> Done executing task "RemovePayloadDuplicates".
1> Using "GenerateResource" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1> Task "GenerateResource"
1> resgen.exe /useSourcePath /compile "c:\users\thoma\documents\visual studio 2017\Projects\Appx.Packages\MyApp.Package\win32\Prism.Wpf.dll"
1> Extracting .ResW files from assembly "c:\users\thoma\documents\visual studio 2017\Projects\Appx.Packages\MyApp.Package\win32\Prism.Wpf.dll" into "bld\Debug\".
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(1194,5): error MSB4018: The "GenerateResource" task failed unexpectedly.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(1194,5): error MSB4018: System.InvalidOperationException: Item named 'interactivity/defaultpopupwindows/defaultnotificationwindow.baml' of type 'System.IO.UnmanagedMemoryStream' cannot be added to the resource file because it is not serializable.
--snip--
So the error has something to do with resgen trying to extract resources from the assembly. Is this step necessary or even useful for converted desktop apps?
BTW. Please tell me if I should raise this issue somewhere else than here.
Thanks!
from desktopbridgetouwp-samples.
Hi @tseifried . While we continue investigating this issue to provide a better answer, there is a temp workaround disabling the resource generator step. To do so, just add this property to your jsproj:
<AppxGeneratePrisForPortableLibrariesEnabled>false</AppxGeneratePrisForPortableLibrariesEnabled>
from desktopbridgetouwp-samples.
Please follow the guidance here - https://msdn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net
To publish and debug your desktop bridge application with Visual Studio.
from desktopbridgetouwp-samples.
I also ran into the same problem and I'm looking for a solution. This happens even with the provided AppServiceBridgeSample...
from desktopbridgetouwp-samples.
Hi nikizh,
did you find a solution for the problem? I am still searching...
from desktopbridgetouwp-samples.
@Andi55 No, unfortunately I didn't find a way...
@vladimp Any suggestions?
Thanks
from desktopbridgetouwp-samples.
Thanks for the feedback guys.
We are investigating the issue, please hold tight.
Thanks,
Vlad
from desktopbridgetouwp-samples.
Hi @vladimp,
did you find a solution for the problem? Hit the same error here.
from desktopbridgetouwp-samples.
me too...
from desktopbridgetouwp-samples.
Guys common... you put out a sample that you don't even try to package and then just abandon it! π Job well done...
from desktopbridgetouwp-samples.
Can you try to set your Win32 binaries in a subfolder of the root Appx Layout?
We have updated our Samples and verified package generation in debug and release.
from desktopbridgetouwp-samples.
I think we have 2 scenarios here:
- Win32 + UWP with app service
- Win32 packaged
The second options indeed creates packages however still fails to install, the first one fails with generating the package... Either way I don't consider any of them as working samples, not to mention the chosen workaround for the second option.
from desktopbridgetouwp-samples.
Can you provide more details on what's not working? Which are the errors?
from desktopbridgetouwp-samples.
We are talking inside a github issue, what would be the point to copy paste the same error message here. I don't want to be mean, if it was a third party repo I would understand, but 2 months have past and we are still "holding tight" ...
from desktopbridgetouwp-samples.
Hi Arpad,
We published an update few days ago that shows how to package the project in each step along the bridge, please try it out - https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/JourneyAcrossTheBridge
As a workaround we are using a JavaScript UWP project to prepare your app for the store.
You can find more details in the README file for the JourneyAcrossTheBridge samples.
We will also publish a step by step document that will walk you through building your own app very soon. if you are still blocked please email me directly to vladimp [at] Microsoft and I will help you.
Thanks!
Vlad
from desktopbridgetouwp-samples.
Which files are in your "win32" folder? I wonder why a .baml file shows up. Are you marking that file intentionally as part of your output? If we could see the solution, that would help.
from desktopbridgetouwp-samples.
Also, a similar issue issue was reported here - https://social.msdn.microsoft.com/Forums/windowsapps/en-US/0e71a593-5976-4b12-ab46-2949d3cc7baf/windows-phone-81-generateresourse-task-failed-error?forum=wpdevelop
Can you please validate whether you have a reference to - "System.Windows.Controls*" in your project?
from desktopbridgetouwp-samples.
Thanks! That worked for me.
from desktopbridgetouwp-samples.
please let me see your AppxManifest file
thanks a lot
from desktopbridgetouwp-samples.
1>MakeAppx : error : Manifest validation error: Line 36, Column 52, Reason: The file name "MainPage.xaml" declared for element "[local-name()='Applications']/[local-name()='Application']/[local-name()='Extensions']/[local-name()='Extension']" doesn't exist in the package.
1>MakeAppx : error : Package creation failed.
1>MakeAppx : error : 0x80080204 - The specified package format is not valid: The package manifest is not valid.
I don't know why
from desktopbridgetouwp-samples.
Related Issues (20)
- Start UWP background task without launching App even single time HOT 2
- how to run unit test as uwp
- Most Samples don't work with recent VS 2019, please Update the samples
- Is it possible to receive push notifications from WNS in a WPF app, which uses Xaml Islands?
- This repo is missing important files HOT 1
- CppWinRT version of BackgroundTaskWinMainComSample doesn't work
- ApplicationTrigger doesn't work in BackgroundTaskWinMainComSample_CS
- Reference a dll in the Background process.
- SecondaryTileSample NOT work, win10 1703, OS Build 15063.1387, VS2017 HOT 2
- How to use Desktop Bridge in UWP Background Task? HOT 1
- when run SystrayComponent.exe , click " open uwp" then an exception
- Rebuild solution to make sure the BackGroundProcess is in your AppX folder.
- VB6 With XAML Sample: toast always create a new instance of app instead of resume the existing app
- Systray extension - reference to winmd files can be simplified HOT 2
- Using AppService with runFullTrust Desktop bridge and allowElevation
- How to support kiosk mode
- Assigned Access Mode not support for DesktopAppTransition
- Unclear code in NorthwindSample/NorthwindCent/UwaClient/App.xaml.cs HOT 1
- Donβt run app with admin privilege, otherwise may not see the purchase diaglog box popup.
- Typo on the README of the UWP Systray sample
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from desktopbridgetouwp-samples.