How to make Windows-Installer Application or exe f

2019-09-19 09:03发布

问题:

I'm working on WPF application based with Local database. My Question is how can I convert it into such application which would run on all PC (Windows OS. I tried to transfer whole project folder into another PC and tried to run exe (debug/bin/application.exe) but it did't work.

I'm working on Visual Studio 2013 with .Net Framework 4.5..

Thank You

回答1:

In my experience, deployment engineering is two phases:

1) Dependency Analysis: What does my application need? .NET? Java? SQL Server? IIS? Files\Folder copied? Configuration setting. Shortcut?

2) How to implement/develop automation to achieve those things.

You say you copy the files over and it wont' work? That means you need to spend more time on dependency analysis.

For #2, I would start here.

https://github.com/iswix-llc/iswix-tutorials

IsWiX is an open source project that I maintain that makes it a lot easier to get up to speed on Windows Installer XML.



回答2:

A WPF application made with .NET implies that it needs a .NET framework to be installed on the target machine. You will not be able to write your own WPF / C# installer application that is able to work on PCs without it.

You could try one of the many third party installers found on the web (e.g. http://dblock.github.io/dotnetinstaller/) or use the VS installer functionality (see Build an installer). I am not sure about the latter, never used it.