-
May 11th, 2013, 07:40 AM
#1
Thread Starter
Junior Member
Users getting an error when starting my application
Hello !
Just wrote a small console application which converts images into other image file formats.
When I am running it on my computer it doesn't give any error messages but when users run it then the application gives out this message:
And the code is here:
Code:
Imports System.Drawing
Imports System.IO
Module Module1
Sub Main()
Console.WriteLine("Converting images")
Try
command()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Console.WriteLine("Done")
Console.ReadLine()
End Sub
Private Sub command()
Console.WriteLine(My.Application.Info.DirectoryPath)
Dim di As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\")
Dim diar1 As IO.FileInfo() = di.GetFiles()
Dim dra As IO.FileInfo
For Each dra In diar1
Dim path1 As String = dra.ToString
Try
Dim bmp As New Bitmap(path1)
Dim file_path As String = Path.GetDirectoryName(path1)
Console.WriteLine(file_path)
Dim name As String = Path.GetFileNameWithoutExtension(path1)
Dim new_file_path As String = My.Application.Info.DirectoryPath & "\" & name & ".dds"
DevIL.DevIL.SaveBitmap(new_file_path, bmp)
Console.WriteLine(new_file_path)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Next
End Sub
End Module
Also I will attach a dll file and compiled exe file.
Application should be build with 3.5 framework and as 86x bit (32x), in the attachment exe file was compiled with VB2008 .Net version.
Where might be a problem ... ?
Thank you
Last edited by Joacim Andersson; May 11th, 2013 at 09:03 AM.
Reason: Removed attachment
-
May 11th, 2013, 08:46 AM
#2
Re: Users getting an error when starting my application
It is against forum rules to attach binary files to your posts. I have notified the mods and they will remove your attachment if you do not do so first.
When these users are running your application, is that DevIL.NET2.dll in the same folder as your EXE?
-
May 11th, 2013, 11:06 AM
#3
Thread Starter
Junior Member
Re: Users getting an error when starting my application
Prieviously when I made a post I was asked to add some files as attachment ... as users couldn't test the file without them ...
When these users are running your application, is that DevIL.NET2.dll in the same folder as your EXE?
Yes it is in the same fodler as exe file ... and it is very strange, can't uderstand where is the difference between my pc and their ...
As my pc don't have that error bu they have ...
Do you have any other ideas where the problem might be ... ?
-
May 11th, 2013, 03:43 PM
#4
Re: Users getting an error when starting my application
Where did you reference the file when building the application? That's where the application is searching for it, not necessarily in the same folder as the exe.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 11th, 2013, 07:35 PM
#5
Re: Users getting an error when starting my application
Originally Posted by newbie11
Prieviously when I made a post I was asked to add some files as attachment ... as users couldn't test the file without them ...
It's OK to attach files to a post but not binaries. If you attach project files then we can see what's in them but if you attach binaries and we execute them we have no way of knowing that they are safe. If some third-party DLL is required to run your project then we simply can't run your project unless there's some other source from which it can be obtained.
-
May 15th, 2013, 07:34 AM
#6
Thread Starter
Junior Member
Re: Users getting an error when starting my application
It's OK to attach files to a post but not binaries. If you attach project files then we can see what's in them but if you attach binaries and we execute them we have no way of knowing that they are safe. If some third-party DLL is required to run your project then we simply can't run your project unless there's some other source from which it can be obtained.
Ok won't do that.
Where did you reference the file when building the application? That's where the application is searching for it, not necessarily in the same folder as the exe.
I was attaching dll files as usual always worked in this way:
-
May 15th, 2013, 09:23 AM
#7
Re: Users getting an error when starting my application
The key maybe the 5 words that happen after the assembly name ... "or one of its dependencies." ... which means that DevIL.NET2 may be relying on yet more assemblies, which aren't being carried over to the project's folder...
What IS DevIL.NET anyways?
-tg
-
Jun 6th, 2013, 10:53 AM
#8
Thread Starter
Junior Member
Re: Users getting an error when starting my application
Originally Posted by techgnome
The key maybe the 5 words that happen after the assembly name ... "or one of its dependencies." ... which means that DevIL.NET2 may be relying on yet more assemblies, which aren't being carried over to the project's folder...
What IS DevIL.NET anyways?
-tg
That's a library which alows to load dds images as bitmap into vb.net ... in the code written above it's shown.
-
Jun 6th, 2013, 12:55 PM
#9
Re: Users getting an error when starting my application
ok, so it sounds like that it is "relying on yet more assemblies, which aren't being carried over to the project's folder..."
where did you source your binaries from exactly?
-tg
-
Jun 6th, 2013, 02:05 PM
#10
Addicted Member
Re: Users getting an error when starting my application
I would suggest using Process Monitor ---> http://technet.microsoft.com/en-ca/s.../bb896645.aspx
Filter the list to show only your application. Then when you start your application you will be able to see everything your application is looking for along with the ones it cannot find. And go from there.
Make sure you run it on a computer that is giving you the error
-
Jun 6th, 2013, 05:11 PM
#11
Hyperactive Member
Re: Users getting an error when starting my application
The DLL you are using is a .NET wrap the original devIL.dll, which is a COM dll I believe. You need to have devIL.dll in the folder as well because devIL.NET.dll references it, I believe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|