thank you for your response.
I tried that, but when I run the UWP app via Visual Studio firstApp.exe was missing in AppX. Thus I use two xcopy commands to copy the 5 files (firstApp.exe, firstApp.dll, firstApp.pdb, , firstApp.runtimeconfig.dev.json and firstApp.runtimeconfig.json) also into the AppX and the dotnetapp directory.
xcopy /Y $(ProjectDir)firstApp\bin\$(ConfigurationName)\netcoreapp3.1\firstApp.* $(TargetDir)AppX\
xcopy /Y $(ProjectDir)firstApp\bin\$(ConfigurationName)\netcoreapp3.1\firstApp.* $(TargetDir)\..\..\..\dotnetapp
After that the UWP app again was able to start firstApp. But when I generate the app package I get following messages:
- 5 file(s) copied
- MakeAppx : error : Manifest validation error: Line 29, Column 64, Reason: The file name "firstApp.exe" declared for element "[local-name()='Applications']/[local-name()='Application']/[local-name()='Extensions']/[local-name()='Extension' and not(@Category='windows.backgroundTasks' or @Category='windows.appService')]" doesn't exist in the package.
- MakeAppx : error : Manifest validation error: Line 29, Column 64, Reason: The file name "firstApp.exe" declared for element "[local-name()='Applications']/[local-name()='Application']/[local-name()='Extensions']/[local-name()='Extension' and @Category='windows.fullTrustProcess']" doesn't exist in the package.
- MakeAppx : error : Package creation failed.
- MakeAppx : error : 0x80080204 - The specified package format is not valid: The package manifest is not valid.
After failed package generation I looked into the AppX folder and saw, that it also contains the dotnetapp directory.
So I changed Executable="firstApp.exe" to Executable="dotnetapp/firstApp.exe" and tried it again and it worked!
After that I added
xcopy /Y $(ProjectDir)OpenMVGPipeline\bin\$(ConfigurationName)\netcoreapp3.1\firstApp.* $(TargetDir)\..\..\..\dotnetapp
to <PreBuildEvent> and replaced the two <PostBuildEvent> entries by
xcopy /Y $(TargetDir)\..\..\..\dotnetapp $(TargetDir)AppX\
Thank you very much for your help!