How to add Readme file in visual studio web installer? - c#

How can we add readme files in web installers created using visual studio.After installing the product,readme file's path should be shown in control panel.

You can easily add a readme by creating it and putting it in the applications contents by finding the text file within solutions explorer, right clicking and then going to properties.
In the properties change build action to content and I'm assuming you'd want copy if newer selected on copy to output folder
from here simply go into the file system of your Installer project, go to application folder then right click on a blank space in the applications folder panel, add, project output and finally content files
this will put your text file inside the folder where it is installed on your client machine, I'm presuming you've already made the text file, if not simply create one by right clicking your project, add item, general tab and then text file.
EDIT
thankyou for the reply,
Rigt click your project, then choose properties and select the application tab you can change all the information by clicking Assembly Information...
EDIT 2
Theres a microsoft application called bizTalk that will do most of it all for you, there's a link with more information here http://msdn.microsoft.com/en-us/library/aa561017.aspx
EDIT 3
The best I can do after a lot of searching is to give you a path that will open a folder for you to place your readme into?
If you want to do that and tinker to see whether this path can be edited, then inside the file system of the installer, right click and press add special folder, then Custom Folder, name it what you like, something like ReadMeFolder? then right click and go to its properties change the DefaultLocation to whatever you like, but give it a property of ARPREADME, from here as soon as you've built and installed it, the folder path for this will be under the "readme" tab in your add and remove programs, there will be a way to change this so that it can target a file, Again I'll do a little more searching to see if i can make it open the file instead of the containing folder
Also have a mess around with making folders properties being ARP.... because the ARP stands for add remove program and its here that you can make the folder to certain things to do with the control panels Add & remove programs.

Related

Files show as hidden in Visual Studio 2012

Hei,
So we have a whole group of people working on the same project and every now and then some files show as hidden, you know the blank file icon like obj or bin.
See my font and texture? They should be normal.
So, I can see them in the folder but not in solution explorer without hitting the Show Hidden Files. I can also modify them but I would like them back.
I have been trying to see if there was a solution but all I get is blogs on how to show hidden files.
So I found this thread
Visual Studio 2012 and missing files
that seems to be giving the reason of my problem. People are not saving properly before pushing to github.
Now is there a solution to this?(apart from saving properly) Can I make all of those files become normal files?
Cheers
Simply right click the files/folders and include them to source control again.
This usually happens if people check in new files/folders but do NOT check in the updated project file, too. The project file contains a list of all files which should be included within the solution. If this runs out of sync, exactly this crap will happen... ;)
Simply instruct your folks to properly check-in. Or do code review on check-in and verify that the project/solution file(s) are also checked in.
They show up as hidden because they're not part of the project/solution, but they are on your file system.
You can right-click the files and click Include in Project
If this does not solve the issue after checking in. The project file is what is not properly getting checked in.
Probably the problem is that they are not pushing the project file (file with extension .csproj). It holds all references to files included on the project so it needs to be pushed when new files are added.
Let everyone know that they need to push this file in order to everyone to catch latest changes on project.

How to add a folder (with help) to resources and how to work with it

I am working on a basic calculator and I want to have a Help in it. I've already written it in XHTML. It is about 30 html files and over 30 jpg files (everything in a folder 'help').
Now a I would like to add this all into my Form. I don't know to add it to the Resources and how to open the 'index.html' file. I thing the System.Diagnostics.Process.Start(); is used for such things, but I've never worked with it. The activation event for this will be click on the 'ToolStripMenuItem'.
And my next question is: When I add all the files to the Project and publish the program (so it can be installed) would the System.Diagnostics.Process.Start(); work for every user? Because I don't know in which folder would the program be install.
Okay you are confusing a number of different things here.
If you want to distribute your help as separate files, you don't want resources.
Just add a folder called help to your solution/project in the solution explorer, move the files into it with windows explorer. Then right click on the folder, choose add existing items, select all your files. Then the important bit on each on them in the solution explorer, select properties , and make sure sure they are copy always, or copy if newer. . Now when you build your project, the help files will go with it, but not in a help folder!
Then you can launch index.html (in the same folder as your app) and the app (almost certainly a browser) associated will fire up with that file.
Resources, would mean the files were not separate, they would be compiled in with your assembly, and you'd have to extract them to launch externally or include your own help form with a be browser control. Have to be damn good reason to do all that work...
If you want one though. Right click on the project, select properties, select the resources tab.

How to use Text file with clickonce and be able to update it when updating?

I have a project and i want to use clickonce...
in the project directory, it has text files on it needed bt my applications.
How can i deliver my program with the text files to my end users via clickonce?
What if i change the text files, added, and removed, and modify some, how can clickonce help me to replace the old textfiles and main program in my end program.
A sample pseudocode, if possible.
Tnx
Ps: the text files are used by my program but its not part of the source code.
1) You can deliver with you programe a text file to your end user. You can embed the file in your application and deliver it with ClickOnce.
Steps (from MSDN) are :
Right-click your project name, click
Add, and then click Add New Item. In
the New Item dialog box, select Text
File from the menu, and name the
file MyTextFile.txt. When the file
opens in the integrated development
environment (IDE), add some text,
and then close the file.
Right-click either the text file,
and then select Properties.
In the Properties dialog box, locate
the Build Action property. By
default, this property is set to
Content.
Click the property and change the Build Action property to Embedded Resource.
2) Everytime you will do a new version, ClickOnce will send back the new Text Resource
3)
StreamReader _textStreamReader = new StreamReader(_assembly.GetManifestResourceStream("MyNameSpace.MyTextFile.txt"));
Console.WriteLine(_textStreamReader.ReadLine());
If you right click on your ClickOnce project and choose properties, and then click application files. If your text file and exe file is has status "include" and "required" the files will be copyed to the local client every time you release a new version of your project.
Just make sure that your clickonce project settings let clients automatically check for updates every time the application starts. (Click the "Updates" button just beneath the application files button)
You can just add the files to your project. Set the build action to "content", and set "copy to output directory" to "copy always". Then when you publish, the files should be included with the assemblies. I assume you're letting the users access these programmatically?
When you want to change the files, just change them and publish a new version and make it a required update -- in the Updates dialog, set the minimum version to the same version you're releasing, and be sure you're checking for updates before the appliaction runs. It will create a new folder for the new version and put the text files you have in the project there, and not copy the old ones forward.

C# problem with Packing the supporting files with EXE, while publishing the project

I am using visual studio 2005, (.net version is 2.0+) to create a windows application. The functionality of the project is matching with the ideal design, there is just one problem in publishing the project.
I use MouseHover method to change the picture(image) used in intention to make attractive UI, when I hover the mouse pointer over the picture .. some other pic is loaded in-place of it .. and in mouseleave method the same picture is retained back.
Now the problem is while debugging this functionality works properly,
But when published, and used, the window won't load the image (as the installed folder doesn't contain these images) .. How to bind the supporting files like images, text files and any other files like xml with EXE??
I mean is there any ideal way to publish the project??
In your project, ensure that the images are set to Copy Always or Copy if Newer on the Copy To Output Folder property (F4).
That should ensure that when doing an XCopy deploy the images will be in the right folder (you will proabably need to change the logic for finding the image paths, so the application finds them in the right directory).
If you are using deployment project that will generate .MSI for your application, just right click on the project, click add files and then pick the images from your project directory.
Those files will be (by default) be deployed into the application target directory, and your end-user app will be able to access it.
You can package them as Embedded Resources.
To embed them, make sure that when the resources are selected in the Solution Explorer that the 'Build Action' in the Properties window is set to 'Embedded Resource'.
Here is an example with sample project on how to embed images : How to use embedded resources in .Net

How to add external file outside the application folder to clickonce deployment (winappliction.net) [duplicate]

I've got an application that I'm moving over to ClickOnce and the app has a moderately sized data folder with hundreds of files that I need to inlcude in the deployment. The folder needs to be in the same place relative to the EXE after deployment. I've seen several suggestions on how to do this but there doesn't seem to be a agreed upon method for doing this.
Any suggestions would be great -
Thanks!
One good way of doing this is:
Create a folder under the app in VS name e.g. "datafiles"
Add all files to that folder using Add as link in the dialog box after selecting Add existing item on the folder
Mark all files as Copy if newer (Copy to output directory property)
Make sure the build action is content
--> when you publish the files will be put in that folder and be a part of the application installation
Good luck!
After deployment, all files marked as data are placed in the ApplicationDeployment.DataDirectory folder. I know of no way to change this. You could copy the data files during the first run of your app, but this approach will not survive any upgrades that include data file changes.
Alternatively if you have control over the location of the data folder during development, you can place in the same relative (to the app folder) location as will be specified after deployment.
https://msdn.microsoft.com/en-us/library/kzy0fky2.aspx
https://msdn.microsoft.com/en-us/library/6fehc36e.aspx
These two articles provide methods of doing this. Between the two of thing you can find one that works for you. The one that worked for me was:
With a project selected in Solution Explorer, on the Project menu,
click Properties. Click the Publish tab. Click the Application Files
button to open the Application Files dialog box. In the Application
Files dialog box, select the file that you wish to mark as data. In
the Publish Status field, select Data File from the drop-down list.

Categories

Resources