publish my project - c#

I have little problem to publish my project in C# express edition 2008 (WinForms).
I saw from Google how to do the basic and go to project property -> publish
But now in the publish folder that was created under my main project's folder and I have there setup and one more file and folder named application files.
But when I run the setup or the other file I'm getting error:
cannot start application MYPROJECTNAME from this location because it
is already installed from a different location.
I have also in bin-> debug ->app.publish a setup file which works fine until it needs to use a txt file in my project and it says that the txt file can't be found.

Related

What is the purposes of exe files in the MVC5 projects?

In MVC5 Project there are 3 exe files:
My web-hosting provider is not letting me to publish exe files, and he told me to delete them.
During web-deploy I remove selection for this 3 files and publish the rest of the project.
When the publishing process finish and I try to access my website I got the error message that the csc.exe is missing :)
Can I do something to not publish exe files and also my website to run as expected?
Edit - I changed MVC4 with MVC5!
Edit - I discuss with my web-hosting provider and he allowed me to read/write exe files and now my project is running as expected.
You can find a comprehensive explanation here:
https://visualstudiomagazine.com/articles/2012/03/20/10-questions-10-answers-on-roslyn.aspx
And here:
http://blogs.msdn.com/b/webdev/archive/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications.aspx
I got the sabe issue with exe files, so I've unnistalled it using the command prompt in the Visual Studio 2015:
uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
After uninstalling this package, these "exe" files are not being created in the bin Folder anymore.

.exe file of program

I have completed my program and would like to send that program in its compiled state to other pc's.
I understand that in the Debug folder there is the programName.exe file, which when I open it on the PC I created it with - it opens.
But if I send that .exe file to other pc's, it crashes or simply doesnt run!
Is there a way for others to see and use my program without installing visual studio?
I have asked this question before on another programming website with not much help, this is the link that they showed me, which i then followed:
http://www.dreamincode.net/forums/topic/58021-deploying-a-c%23-application-visual-studio-setup-project/#-application-visual-studio-setup-project/
The installer installs the program, but there is no files with it to open!
Other machines won't need to have Visual Studio installed - but they will need the appropriate version of .NET, depending on what you built against. If you target the "client" profile, the .NET distribution is fairly small.
You could build a setup project which kicks off the .NET framework installation if necessary, but it's likely to be quite a lot of work - in many cases it's probably simpler just to tell people what they need to install first, particularly if this is for personal use or friends/family.
There are most likely other DLLs that your project is dependent on that do not get copied over when only transporting that .exe file. You COULD just copy those over as well.
However, the best practice is to add a new Project under Setup for a Installer. It should detect those dependencies. Then the other users will just have to run the setup.exe that gets created (but you have to include the other folders and files that get generated). Open up the File System Editor tab of the Installer project. Then inside the Application Folder, I right click on "Primary output from [Main Project] (Active)", then select "Create Shortcut to ..." and drop the Shortcut into the Program Files and User Desktop folders on the left.
For something simple, the other DLLs should be fine.
Create the MSI Installer project for your application.
Copy your project output as input of MSI Installer.
.Exe is depends on .msi file, so when you click the .exe must verify the msi file existed in same directory.
Verify the .Net framework and Installation 3.0 before run the .exe or .Msi file.
The easiest approach would be:
1: Right click on your Solution Explorer and add a new project. The new project would be a Setup project, which would be under Other Projects -> Setup and Deployment -> Visual Studio installer and then choose Setup Project from the right side.
2: Add all your bin folder files to Application folder and then build your solution.
3: It will create a file with .msi extension. You can distribute that to anyone you want and they wouldn't need any VS.

Deploy Windows Applications with Visual Studio.NET

I have created a window setup file for my window project in visual studio 2008. This setup file is running properly and installed the software in computer. But I want to add a external exe file into my setup project. But this external exe should not be installed on computer. How can I add this another exe file in my setup not for installing?
Well that is relatively easy, follow these steps and you will be on:
Add new setup project (if you already have one, disregard this step)
Click on the setup project, then on the left panel select the application folder.
right click the application folder --> Add --> File.
Select the file you want to install with your setup.
you can choose in the application folder properties whether to always create this folder and its files or not.
That it :)

Windows service will only run when created from Visual Studio Release folder

I have a Visual Studio 2010 project that references a dll from another project.
I've also successfully created a service to start this app.
To create the service I simply ran a batch file that called the installutil.exe from the .net4 area and pointed it at the .exe in the Release folder of my VS project. The Release folder also contains a copy of the referenced dll.
With this arrangement everything works fine - I can access the dll through the service.
However, if I try to create the service from anywhere other than the Release folder it doesn't work.
To explain:
I copied all the files from the VS Release folder into another unrelated folder and modified the paths in my install script. The service was created successfully and does start up. Unfortunately I cannot access the dll through the service when the service is created in this way. Why?
I'm curious if the current working directory was the Release folder when it worked. Perhaps it's because the working directory is not where the .dll file is in your broken scenario. Have you tried changing directories first, before calling the .exe?

add mobile software exe in my msi file and need to run before my msi file run on client system

I have made msi file of my project using setup and deployment option from visual studio.I want to add one exe file of mobile software in my setup folder and i want ,that mobile software exe should be run before my msi file from my setup folder.I don't know that how i give the path of that software exe and run from my setup folder.
I have used prerequisites option and also add file in my application folder while making setup,but i don't get any solution of my problem.
Please help me.
A prerequisite is the correct solution. Visual Studio setup projects do not support custom prerequisite creation. However, it can be done by manually generating the required manifests.
You can find the manifests structure here: http://msdn.microsoft.com/en-us/library/ms229223(VS.80).aspx
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
You can then select the prerequisite in your setup project property pages.

Categories