Error while installing a .net setup executable locally - c#

I have created a setup for my windows application in .NET 2008
After building the same i have the .msi and setup.exe files in my release folder.
The problem i am facing is :
I can install the application using the msi installer files from the shared network folder. But when i copy the installer locally and tried to install it,
i get the following error: Error reading file.Please Try again.
Anybody having any ideas if there are any properties to set in the installer project.
Regards
Constant Learner

Just a thought, you can use Orca to go through the .msi and see if you're having any static references to your development machine within your msi.

The application is a simple windows application without any database associated with it.
Its just a hello world windows application. So i presume its something related to the configuration part of the installation...
Constant Learner

Related

Publishing C# application with VisualStudio

I have an application written in C# using VisualStudio 2015 and I want to publish it (eg give an exe or installer to somebody to use it on its PC). From VisualStudio there is possibility to click "publish" in solution explorer. The result files are:
-Application files (File folder)
-project.application (Application manifest)
-setup.exe (Application)
As far as I know "manifest" file should be some metadata, but I can execute that file and it gives me an installer (the same as setup.exe). After installing it runs an application (just like setup.exe). It makes me confused - what exactly project.application is? Can I delete it and use only setup.exe? What is the correct way of publishing an app? One last thing: why does the installer run installation on first execution and run an application on any other? I would expect to run installation any time (just like other software).
Thanks
It sounds like a ClickOnce application. See the following link for more information:
ClickOnce security and deployment
In a nutshell:
The installer copies the files to the users AppData and then runs the application.
There are also other options such as checking for updates from a network location or web address. Then when you run the application it checks for updates and uses the manifest to do an incremental update of the application files.

How to run another .EXE from my application setup ( VS 2010 )

I have a wpf application and I made a setup, and during installation i need to create database, and edit Connectionstring (app.config). So I made CustomAction add Installer.cs and override Install method and it done.
Now i need to install SqlServer Express from my setup, ie before creating database I should check whether the machine have installed sqlserver if not it should install form my application setup.
As far i know using process.start() i can run exe, but problem i am facing where i should keep sql.exe and how to get path
provide any usefull link much appreciated
ScreenShot:
You can use dotNetInstaller or similar bootstrapper. This solution create only one installer that install other pre-requisites and then execute your Visual Studio setup.

WPF application for Client Execution

I have created a simple inventory application in WPF. How should I give it to client now ?
One way what I did: I have set my AppPresentation solution as start up project and I can see all the DLLs from other solutions are added in the Debug and Release directory of this solution.
When I copy the Release folder to other drive (from D: to C:) and run the AppPresentation.exe some Error occurs about some DLL missing but I can still see those DLLs in this folder.
However when I copy the debug folder to the other drive and run the application i.e. AppPresentation.exe now I can run the application successfully with complete working.
Can I give this entire Debug folder to the client and expect that it runs perfectly on his machine ? I will ensure .NET 4.0 Framework is installed on that machine (but not Visual Studio ofcourse). Will this work ?
It will work as long as you have the required version of the .NET Framework installed on the client and all the necessary dll's have been included,
Ideally you should look at creating a Visual Studio setup project:
Using a setup project has the following advantages:
All your dll's and other files required for the application to run will be consolidated in one setup file
You can specify prerequsites such as .NET Framework which will prevent installation until all the required components have been installed first.
Users can specify exactly where on disk the application should be installed without manually copying the dlls (as would be the case in your scenario).
This is but a few advantages of using a setup project but hopefully you'll be convinced to give it a try as it is the preferred way of installing Windows applications
P.S If your setup project gets more complex consider looking at Wix

Visual Studio 2012 Network Shares

I emulate Windows 8 on a VM using Parallels. I store all of my developer projects on my Mac's partition for simplicity and coherence.
When I try to build an app (Visual Studio 2012) running off this network share, I get the following compile-time error:
Error 1 Error : DEP0700 : Registration of the app failed. Rejecting a request to register from file:///Z:/Users/MY_USER_NAME/Sites/App1/App1/bin/Debug/AppX/AppxManifest.xml because the files are on a network share. Copy the files to the local computer before registering the package. (0x80073cf9) App1
Does anyone know how to solve this issue? I need to tell Visual Studio 2012 that my network share is a trusted device, or at least dupe it into thinking the project is in a local drive. Is there anyway to create symbolic links in Windows?
In Visual Studio 2010, I solved this issue as outlined on this website: http://www.sehajpal.com/index.php/2010/10/how-to-solve-loadfromremotesources-error-in-vs-2010/
Thanks for the help!
This post by Gearard Boland solves this issue. Hopefully this comes in handy for anyone else developing over a network share:
Yes, it's by design that you cannot run a Metro app from a network drive and deployment from Visual Studio essentially registers the app with the system without actually packaging and installing it (so it doesn't get put into the normal install location, which is local).
You can still work with sources on a network drive, but you'll have to override the deployment location, which by default is under the project's root directory (e.g. bin\). You have several options:
You can switch from local debugging to remote debugging and set the machine name as 'localhost'. This will do a remote deployment on your local machine (thus not using the project's directory). You don't need to install the Remote Debugger tools, nor start msvsmon for this to work on localhost.
You can override the project's output directory. Right-click on the project and change the output directory to something like: $(Temp)\$(MSBuildProjectName)\bin\$(Configuration), where Temp is an environment variable pointing to your Temp directory.
If you still want normal output to live next to the sources, e.g. when you build the appx package, etc., you can override only the layout directory instead of the entire output path. For this you'll need to modify your project file directly (e.g. *.jsproj, *.csproj, ...) to add the new value:
<PropertyGroup>
<LayoutDir>C:\WorkingFolder\$(MSBuildProjectName)\$(Configuration)</LayoutDir>
</PropertyGroup>
Hope that helps.

How to use ClickOnce to deploy my C#(4.0)Visual studio 2010 windows form based Application?

We are developing C# 4.0 windows based application using visual studio 2010. Now we want to make an installable version of the exe using clickonce to deploy our application. I am new to .NET platform. So, please give me a step by step procedure to use clickonce to deploy my application.
While following steps :What should i need to given in Installation Folder URL Box(2 nd text Box):
Here is the break down of the two paths in this wizard
Publish Folder - Where should the Publish process put the ClickOnce deployment package
Installation Folder - Where will users of the application go to install the application from
Often times these are the same location. For example when I deploy ClickOnce applications internally I publish to a network share. This is the same place where users go to install the application.
One scenario where they would be different is when the users install from a web location. In that scenario you'd often have a publish folder which was a network share or path on the local computer while the installation folder was a web site URL

Categories

Resources