Windowstemplatestudio: WPF installer

Created on 6 Apr 2020  路  10Comments  路  Source: microsoft/WindowsTemplateStudio

Describe the bug
After creating a new app, I wanted to test out the package.appinstaller. After executing it, it shows a window saying "Error in parsing the app package."

To Reproduce
Steps to reproduce the behavior:

  1. Create new WPF project
  2. Add installer
  3. Build
  4. Run installer

Expected behavior
Installer runs and installs the package on computer it is ran on.

Additional context
I am a newbie so please go easy on me.

System

bug

All 10 comments

Hi,
You can try creating the package with Publish > Create App Packages using x86 configuration

image

How can you create a new project wpf with dev-nightly? i got an error saying: The given key was not present in the dictionary . So i cannot even create a project. What kind of mistakes i'm doing?

I was already running nightly.

I've just tried to reproduce that but I can create and install the app using the MSIX feature, please try following these steps:

  • Set Packaging project as the startup project
  • Set build configuration as x86
  • Right click publish => Create App Packages => Sideloading (without automatic updates) => use selected certificate => select x86 Debug
  • Open resulting package folder
  • Install certificate
  • Install using Install.ps1
  • Open the app

If you still can install the app, please try to attach an easy to reproduce generated app and I'll try help you

@mvegaca Well, your step-by-step instructions did help. Installer does its magic and installs the app, but now it does not launch and I do not get any error message either. Probably a problem with me having a Entity Framework database inside? But all calls to it are covered by try carch with message box prompt if error happens.

@Luk164, could you share a repro project?

@Luk164, could you share a repro project?

I tried creating a fresh project, but that worked fine, so I sent you invites to my two part project that is having the issue (this is a part of a bachelors degree project so I should not share it openly). Please excuse the other installers, I was using hail-mary approach to see if something works. Hope it helps

@Luk164, is this still an issue? Could you provide repro steps or resend the invitation to the repro project?

@sibille Ok, I tested it and fresh project works fine. The only thing left is to get it to work on the old one. I will be defending my work 25.6. after that I should be free to publish the code. I will also re-add you to the repo now. Edit: Access granted to both main project and its one submodule.

Had a look at your project the installer looks good, I think your problem is related to entity framework. I see an error in the EventLog saying that package: 'Microsoft.EntityFrameworkCore.Design', version: '3.1.4' was not found.

I did not find a lot of information on how to correctly setup entity framework in a packaged wpf application, did you try to open an issue at https://github.com/dotnet/efcore/issues?

@sibille Good find, I will create an issue when I can finally show source code. Thank you
Also, as you probably noticed, I already have the old windows installer packaging set up so this is not a very pressing issue. I am also thinking about trying out WiX or NSIS. I tried advanced installer but it was not the right fit for me

Was this page helpful?
0 / 5 - 0 ratings