How to add the external file to C# application? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I just want to add the external file in C# desktop application to store the queries. In that I want to add each query as string. And will take out of the file when needed.
1) How to add external file in C# desktop application.
2) How can i access the file from my application?
Thanks in advance.

There are a couple of options:
Add the file to the project and set the "Copy to Output Folder" option. Then make sure you deploy the file with the application.
Make the file an embedded resource. Then it becomes part of the exe and you don't have to deal with a separate file for deployment.

Related

Can a C# .exe file be accessed by multiple users simultaneously? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I created a small program for one department in our company. I put the C# exe file in one of the shared hard drives on our network. Will there be problems when the exe file accessed by multiple users at the same time?
On the general, yes it can.
On the specific, and as mentioned in the comments by others, what then remains to be asked is
what the application does.
if there is any user-specific functionality or dependency.
if the application can handle concurrency for reads and writes/updates on a DB or file-level(depending on its data sources)

How To Use A Custom Library? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to use compression of some files but GZipStream can not archive many files in one zip only! So I want to use this
http://icsharpcode.github.io/SharpZipLib/
But I have no idea how to install/use/import custom libraries. What should I do?
Right-click your project and select "Manage NuGet Packages..."
Search for "SharpZipLib".
When it populates the list, install it
The installation process should add the necessary reference[s] to your project's References folder
You might then need to add a "using" for the library to the class where you want to add the code. It's possible, though, that you can just right-click the code and select "Resolve" to have the "using" automatically added for you.
Then look at the library authors' documentation for usage.

Create a digital signature in a file to prevent tampering with the file in C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to create a simple licensing verification for a software and I want verify is a file has been modified. I have XML file with license information and date when the license expires.
If someone changes this file - How do I detect?
Has to be difficult to change the application (C# .NET) if someone changes the file and hack the application (to skip the verification - I have to stop that too)
ClickOnce does that... You cannot modify the contents of a clickonce manifest, yet it is readable XML format file. I want the same

Deploying Winforms app [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm having trouble creating an installation program for my Winforms application. I am using the Windows Installer and the publish function. It creates a nice setup program. After I run the setup on a client machine, I want to update the App.config file to point to a different database than was used for the setup. I have this setting in the app.config file. However, I am not able to update the app.config file on the client's machine. Temporarily, I am creating a new build when I want to change the database that the application points to.
Duplicate of...
Setup App.Config As Custom Action in Setup Project
?
The answer looks good...
http://raquila.com/software/configure-app-config-application-settings-during-msi-install/

C# : file copy notifying [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
hi i am creating a c# application that monitor the files that has been copied , the aim of program is to alert user that there is a file has been copied , i know the file system watcher class , but it has only 4 events , change or create or delete or rename , is there a way to know if file has been copied in or out of system ?
When a file is copied into the system you will also get a change or create event. But if it is simply accessed (which is what happens when it is copied) FileSystemWatcher is of no use.
You can use Auditing file and folder access feature of Windows.
The task makes no sense. First of all, there's no "copy" operation on the OS level. Copy is a sequence of open/read/close (source) + create/write/close (dest) operations. Now, even if such operation existed (eg. Explorer has such concept), what about archiving the file and then copying out the archive?

Categories

Resources