-2

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

3
  • 2
    You've got quite a lot of work ahead of you. First you need to update to a later version of Visual Studio. Then you need to learn how to create an installer using a tool like WIX or Advanced installer. Investigate these tools. Build some example installers. Test them on all Windows versions you want to support. If you run into problems, post the install scripts to Stack Overflow, tell us what you think they should do, then show us what is going wrong. Commented Mar 31, 2019 at 16:51
  • 1
    As Chris said: 1) work out obvious dependencies such as .NET, Java, etc... 2) Then test and choose a deployment tool, 3) package it all up in an MSI or some other format, 4) test on virtuals or clean systems and if need be 5) debug dependencies (hardcore using procmon or using visual studio). And 6) finally some ideas to work around: Common application launch problems and an older alternative. Commented Mar 31, 2019 at 17:41
  • And throwing in a link to an older answer on a similar topic. Commented Apr 1, 2019 at 3:56

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

For simple projects, working out #1 manually by hand is fine. Use a virtual machine of a clean install of windows that has been snapshotted for easy rinse and repeat. Install dotnet and take another checkpoint. Copy your files manually and worth things out until you have the recipe and then begin the process of creating an MSI/EXE to automate that.
For complex projects you do the same as above except you start creating your installer project as you go along. The ideal is that a CI/CD pipeline always creates a shipable product. Update the MSI as you add additional features to your product to avoid building up technical debt.
1

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.