Hi.
I wrote a project in C# and I want to release it and execute it in another computer.
My Project uses some files that are in my computer's hard disk, for example D:\MyProject\MyIcon.ico and so on.
when I copy "Release" Folder in "MyDocument" to another computer it throws an IOExeption because, it can't find that files.
What should I do to solve my problem?
Thanks.
Loading

Aaron ColenPosted Sep 13, 2010, 9:52 AM
Right click your project under Solution Explorer and choose Properties.
On the Resources tab (on the left) you can add icons, bitmaps... and they will be built into the .exe.
You will then have to change references to the files to Properties.Resources.FileNameHere
For some reason Icons don't like being attached to forms when added this way but you can get around it by assigning the icon after "InitializeComponent();" like:
public Form1()
{
InitializeComponent();
this.Icon = Properties.Resources.MainIcon;
}
Sam HobbsPosted Sep 15, 2010, 1:32 AM
Aaron ColenPosted Sep 14, 2010, 10:20 AM
Using the Setup Project you can change install location, icons...
Majid KamaliPosted Sep 14, 2010, 8:57 AM