Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

Adding an Excel file to be published with Window Apllication

9 like 0 dislike
Hi Guys, I have been trying for an hour or so and cannot get this right. I have a Visual Studio project which reads an Excel file, which I have added to the VS solution. When I run the project in VS, the file can be opened successfully. However, when I publish the project, the file does not get included, and therefore cannot be opened by the application.

I think there must be a way to say to Visual Studio to include that excel file to the deployment, however I can't find the option.

I am now to Windows Application development, so sorry for the trivial question!
asked 2 years ago by SeO (39,810 points)

1 Answer

2 like 0 dislike
 
Best answer
I can think of 2 possible ways to do this:

1. Make sure the CopyToOutput directory attribute on the file is set to Copy Always or Copy if Newer.

-- OR --

2. Create a post-build step that copies the file manually to wherever you want.
answered 2 years ago by BloggeR (179,550 points)

Related questions

3 like 0 dislike
1 answer
7 like 0 dislike
1 answer
7 like 0 dislike
1 answer
asked 1 year ago by daneim (127,080 points)
12 like 0 dislike
1 answer
5 like 0 dislike
0 answers