Const
Const

Reputation: 131

DotNetBar c# app crash when opening in another pc

I created a c# app just to test the DotNetBar components it works perfectly in my computer but when i sent it to a friend to tried the app crashes instantly. do I have to move some dll files or something. thanks

Upvotes: 1

Views: 1229

Answers (2)

Wayne
Wayne

Reputation: 497

This problem is from the dotnetbar dll not being present on the second machine. There are two solutions that allow programs with dotnetbar to run on machines that do not have it.

  • You can go to references and change copy local to true (solution OP mentioned in comment on other answer). This includes the dll in every build which, in some situations, can make debugging builds more time consuming.

OR

  • You can go to Publish, open the Application Files window and change the Publish Status to Include. This will only include the dll when you publish instead of every build (generally more recommended option).

note: both of these are done from the project properties

Upvotes: 2

Sudhakar Tillapudi
Sudhakar Tillapudi

Reputation: 26199

I suspect that you have developed your Application in heigher version of .NET Framework and trying to run it on your friend mavhine which does not have the same.

Solution: try to find the .NET framework version which is being used by your friend and then target your application to the same version.

Follow the below steps to change the Taget Framework version.

1.RightClick on Your Project
2.Select Properties
3.Now Select Application Tab
4.Select Target Framework Version dropdown
5.Select the .NET Framework version xyz [here xyz is the .NET framework version used by your friend]

Upvotes: 0

Related Questions