My Question is How i can make my project portable.whenever i run my project on another computer it gives an error for wrong path. please tell me any code which can choose its path in resourses or debug folder to make a file in project.and whenevre use that file its easily accessable without any error.and file saved in a name series.please help me.....

Recommended Answers

All 2 Replies

Make sure your file is always in the same directory (in debug or release mode).
Give the full path to the file instead of a relative path.

Create a folder in \bin\Debug as "Test".
Use this to locate folder and files within.

Dim myFolder As String = Application.StartupPath & "\Test\"

When distributing the .app, make sure you have a folder named "Test" in the same folder as the .exe and you can use that Application.StartupPath & "\Test\" for whatever use needed.

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.