Add content file in ClickOnce Publish - msbuild

I have an excel template which I would like to add as part of ClickOnce publish.
When I add the excel as a link to the ClickOnce project and publish, it is added as .xlsx.deploy and removing it from Application Folder to the root publish folder throws error.
Is there a way to add a content file to the ClickOnce publish and not include in the set up ?

Related

Adding a folder with files to application - Visual Basic 2010

In my current project I have a folder with several files that the application needs to function properly. The folder is in the bin/debug folder and with the line Application.StartupPath I can easily access the files. It couldn't be easier.
However, when I publish the application the files don't seem to be included in the project, at least not at the StartupPath.
So my question is: how am I supposed to add this folder to my published application?
First, you'll need to include those files in your project. Then click each file in the Solution Explorer and in the Properties Windows change the value for "Copy to Output Directory" to "Copy Always".

vb.net publishing file location

I'm using vs2010 pro and I've created a project and everything works fine. I have added a help file (.chm) to the project and set its properties to "content" and "output if newer".
My project resides on my C: drive in a folder; for example c:\myproject\whatever
When I publish my project, I publish it to a different location (on the network) z:\whatever
The project gets published to that location and the application works fine except for the fact that the .chm file ends up in my c:\myproject\debug directory and not on the network path that I published to. So my app can't find my .chm file after I publish it. It can only find it when I hit the green arrow and build it locally.
How do I force it to put everything in the publish folder that I choose when publishing?
Thanks.
I think the .chm is ending up in the debug directory for an unrelated reason. Anyway, to get it into the publish location, look on the Publish tab of the Application Explorer window, and click the Application Files button. Locate your .chm file in the list and change its status to 'Include'

How do I publish specific files not in project in VS 2010?

Is there a way I can publish *.ascx files without adding them to my project?
I am trying to make my user controls in Visual Studio 2010 reusable. I have a project containing my user controls called ControlsLibrary solution directory. I copy the ascx files to the web directory upon building the project with build events.
I use the command copy "$(SolutionDir)ControlLibrary\*.ascx" "$(ProjectDir)controls\"
This copies the *.ascx files from G:/SolutionDirectory/ControlsLibrary to C:/Inetpub/wwwroot/WebProject/controls
Now when I publish WebProject, the publish does not copy the *.ascx files from C:/Inetpub/wwwroot/WebProject/controls to my website. This is because they are not added to my project.
Is there a way I can publish *.ascx files without adding them to my project?
I know there is a way to publish all files by selecting the option "All files in this project." That includes more files than I want.
Have you considered using the Virtual Path Provider approach? Here's a good article on it: Load Web Forms and User Controls from Embedded Resources.

Move files to a specific folder when run the setup file for VB.Net Application

I have created deployment package for VB.Net appolication and it runs fine. When setup is rnning, I want deployment package to move a file from bin folder to other specific folder.
Please suggest, how can I move this file to specific folder.
Any help would be appreciated.
Thanks, Yogi
In Visual Studio 2008 setup project,
Select File System on Target Machine and then from Action menu select Add Special folder and then Custom folder. A new folder will apear on left hand side under the "File System on Traget Machine". Add files, into this custom folder, which you want to copy into into specified location,
Now go into the property of this custom folder and set the DefaultLocation where you want to copy files under this custom folder.
Now when you run the setup this file under the custom folder will copy into the specified location which you set in DefaultLocation.
Yogi..

Include xml files as application files and not data files in ClickOnce

By default ClickOnce will include all .xml files as data files. This results in the xml files are deployed in a data directory and not in the application directory.
Is there a way to generate the manifest from MSBuild/Mage that will include xml files as application files viz., not add the writeable="applicationData" attribute.
You could try adding the XML files to the project and within their properties change:
[DELETED]
EDIT: Here's the information on changing the publish status of the file (with some modifications):
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 XML file.
In the Publish Status field, select Include from the drop-down list.
Can you just embed them as a resource in an assembly?