Setup project for wpf application - wpf

I am trying to build a setup-msi using visual studio for my wpf application.
The issue i am facing is that i force primary output from wpf project to the setup project
and the dependencies are calcaluted automatically.
I run the msi locally (on the machine i built the wpf app) and everything works fine.
The problems start when i try to install it on different machines.
On other machines i run the installation process and it finishes justfine
but when i try to run the application i get exceptions about assemblies that could not be found.(e.g System.Web , Version=4,0,0,0 could not be found etc)
I really suck building setup projects but can anybody give a hand?
P.S.: I also tried installShield... same results.

I would guess that the target machine only had .NET Framework 4.0 Client Profile installed. System.Web is in .NET Framework 4.0 Extended, which is installed with the full 4.0 Framework but not with the Client Profile.
Are you bootstrapping .NET 4 in your setup?
Check for the presence of "Microsoft .NET Framework 4 Client Profile" and "Microsoft .NET Framework 4 Extended" in Add/Remove Programs (XP) or Programs and Features (Vista/7) on the machines where the application ran fine and those where it gave that error.
Edit: .NET Framework Deployment Guide for Developers. That should help you figure out how best to deploy it.

Related

Launching WPF App on Windows 10 with .NET 6 runtime does not work

I am publishing a WPF (.NET 6) application with the following settings:
This works, but if my users want to launch the exe-file on their own PC they get an error message: ".NET 6.0 Runtime is not installed".
This makes sense to me because .NET 6 is quiet new.
But even after installing the runtime they still get this message (after restarting their PC).
Only if they install the SDK they can launch the app.
But the SDK should only be fore developers?
Am I publishing my app in the wrong way? How can I run .NET 6 apps with only the runtime installed?
My users are all using Windows 10.
I could resolve my issue with deploying my app as "Self contained". Now the framework is inside the published files.
Everything fine...
However, strange that the initial way did not work. :(
Make sure to get the .NET Desktop Runtime 6 from the Microsoft download page:

How to create MSI for WPF .Net Core 3 Application?

When working with .Net Framework 4.7 & WPF, we use fody weaver to package up all the project dlls etc... into one dll, so we could then use Wix installer.
This is extremely convenient, and fody worked a treat.
With a .Net Core 3.1 Wpf app I cant get fody to work and they have put it in maintenance mode because of .net core 3's new single- file exe's.
I can create a single file exe but still need to install my app as its code signed and I want the user experience to be familiar with the standard ms installer ui.
At the moment im sure I can create a Wix project and include all the dll's, but there are hundreds of them with .net core & this is an immense amount of work.
Can anyone shed any light on how to install a .net core 3 WPF app using Wix?

WPF Designer view crashes on loading in .NET Core 3.0

I'm developing a .NET Core 3.0 WPF application on my main computer. This works as it should but when I transfer this project to my laptop (through GitHub) and open it, I get the following error message when I open a XAML view.
The .NET Core 3.0 run-time for 'x64' platform configuration is missing or
damaged. Please download and install .NET Core 3.0 SDK for the 'x64' platform.
(Exit code: 80008096)
So after installing the SDK, run-time etc from here:
https://dotnet.microsoft.com/download/dotnet-core/3.0
I'm still stuck with this error. The project builds fine and I can run it, the problem is that the design view is always crashing on the loading of a view.
I have tried completely uninstalling and reinstalling .NET Core 3.0 SDK and run-time without success, restarting my laptop multiple times but to no avail.
Any suggestions?

What package of .Net framework is required on target client machine in order to run .Net winforms application?

I'm Trying to deploy my winforms project using installshield in order to make is available to be installed on other computers. My project is written under .net framework 3.5.
My question is : What version of .net package should be installed on the target machine in order to be able to run my project?
One thing to notice is that target machine is not connected to internet so I have to embed a standalone offline installer for .net framework.
Surely, with .Net framework 3.5 full redistributable package installed, my project runs fine. But it's ~200MB. Should I really install 200MB in order to run my ~10MB project on target machine?
one other option would be installing client redistributable package which I heard ~30MB. But I couldn't find any official release and am not sure if that's gonna work.
Any help would be appreciated.
You should deploy with the web installer so that it can determine what your client needs and download only those components. The full install is that big because it contains all variants of the framework for all possible systems (x86, x64, etc.).
This site from Scott Hanselman is an excellent resource on the matter of deploying .NET.
http://www.hanselman.com/smallestdotnet/
As it states on that site:
If you look for .NET Downloads on
Microsoft's site, it might look like
the .NET Framework is 200+ megs. It's
not. Those big downloads are the
Complete Offline Versions of every
version of the .NET Framework for
every kind of machine possible. The
big .NET download includes x86, x64,
and ia64. It includes .NET 2.0, 3.0,
and 3.5 code for all systems all in
one super-archive.

How can I inform the user of an XCOPY WPF 4 app that he needs to install .NET 4?

I've made a small tool application with Visual Studio 2010 which to distribute it, I zip these files from the Release folder:
Data
MainData.mdf
MainData_log.ldf
DataBackup.exe
DataBackup.exe.config
FluidKit.dll
then unzip them on the target machine (no installation).
When I run it on a Windows 7 machine with .NET 4 installed, it runs fine.
When I run it on a Vista machine with .NET 3.5 installed, it gives me this default error message:
In order to run this appication, you
need to install the following version
of .NET: v.4.0.21006 To learn how to
install this version, contact the
distributor of this application.
When I run it on an XP machine with .NET 3.0 installed, it gives me an error that doesn't that the application cannot start but doesn't mention installing .NET.
Is there anyway that I can intercept these messages to e.g. give a nice-looking, custom message with install instructions and a link to the .NET 4 download?
I think that the only solution is to make a small non-.NET application that checks if the .NET Framework is installed, and if so, launches your .NET application. For the framework detection part, see for example here: http://www.codeproject.com/KB/dotnet/DetectDotNet.aspx
Check out the Application.DispatcherUnhandledException Event... maybe you could globally catch the exception and inform your user in there about having to install .NET 4.0. Probably this can help you determine what .NET platform versions are installed, and maybe even avoid using the .NET 4 features if you see that the client machine does not have it.

Resources