Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello !

I am making my own version of an open source project call Mission Planner (it's an app that allows to control many types of drone so I configured it to be more effictient for my drones). I am know trying to build an installer for my knew app but I am struggling with some aspects.

Here's what I did so far.

Create a knew setup project in the same solution, in the app folder I had a project output (the assembly appears on it's own), i created two shortcuts, on for the desktop and the other for the programs menu. Then i modyfied the different parameters (name, url, manufacturer etc...). Then I cleaned the solution, built the installer (everything was ok) and then I rightclicked and selected the "install". Everything was okey, I had my shortcut on the desktop and program menu.

BUT

When I try to execute the app it does not work, here is the error I have in the output window :


System.TypeInitializationException: The type initializer for 'MissionPlanner.MainV2' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'System.ValueTuple, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) ---> System.BadImageFormatException: Cannot load a reference assembly for execution.
   --- End of inner exception stack trace ---
   at MissionPlanner.MAVLinkInterface..ctor()
   at MissionPlanner.MainV2..cctor()
   --- End of inner exception stack trace ---
   at MissionPlanner.MainV2..ctor()
   at MissionPlanner.Program.Start(String[] args)


So if anyone knows what this means I would be glad to know what is going on and if there's any solution to fix this.

Thank you very much for this !

Goodbye !

What I have tried:

You can follow my process in the message bellow
Posted
Updated 28-Feb-22 4:04am

1 solution

Why to force doors wide open?

Take a look here: Create custom installer for ClickOnce application - Visual Studio (Windows) | Microsoft Docs[^] and ClickOnce Deployment - Windows Forms .NET Framework | Microsoft Docs[^]

InnoSetup[^] is very good alternative. I have used it several times. All what you need to do is to include your executable and all libraries which are placed in Release/Debug folder.

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900