473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Loading MFC dll from C# using VS2005 when copy to another computer

5
Hi,

I am running C# application with MFC. dll project.
I managed to run the application when the VS2005 environment exists but when I copy the .exe and dll to another computer I get the following errer:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in FilesUpdateApplication.exe

Additional information: Could not load file or assembly 'StrtData, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Please advice,
Thanks
Jan 25 '07 #1
4 2408
RedSon
5,000 Expert 4TB
The first thing you can do is check to see what version of .net framework your target machine has. Be sure that the environment that you coded in is the same or similar to what you are running the app in. Second it sounds like whatever your program does it does it on a hard coded input file. You may want to ask for that input from the user or make sure your input file is in the same directory as your program expects it to be in.
Jan 25 '07 #2
Idit
5
The first thing you can do is check to see what version of .net framework your target machine has. Be sure that the environment that you coded in is the same or similar to what you are running the app in. Second it sounds like whatever your program does it does it on a hard coded input file. You may want to ask for that input from the user or make sure your input file is in the same directory as your program expects it to be in.

I work on both woth .Net 2.0.
When I remove the loading of the dll, it works fine and I don't parse any local files.
The error is related to the dll name, maybe something related to the Assembly.
Do you know if there is a special syntax for loading the dll?
I just added it as a reference to the project and worked with it on my machine.



Thank you
Idit
Jan 26 '07 #3
RedSon
5,000 Expert 4TB
I work on both woth .Net 2.0.
When I remove the loading of the dll, it works fine and I don't parse any local files.
The error is related to the dll name, maybe something related to the Assembly.
Do you know if there is a special syntax for loading the dll?
I just added it as a reference to the project and worked with it on my machine.



Thank you
Idit
The only thing I can think of with out delving into your code, is the regserv32 facility that Windows provides. Take a look at that, maybe you have to register your dll on the test system?
Jan 26 '07 #4
Motoma
3,237 Expert 2GB
The only thing I can think of with out delving into your code, is the regserv32 facility that Windows provides. Take a look at that, maybe you have to register your dll on the test system?
Ooooh, good one.

Idit: The other thing that might be happening is an issue with the working directory for the executable. When you compile and run in the VS2005 environment, the working directory for the program is actually the main project directory, however, when you run it outside VS2005, it is the directory the executable is located in.
To diagnose this, try running the program on the same machine you built it on, but outside of the VS2005 environment.
Jan 26 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
8
by: Ram Baruch | last post by:
Hi, I'm trying to use the File.Copy() function. It works well when the desenation file is local (Like: C:\dest\dest.exe). The problem is that when I'm trying to copy to a destenation that starts...
9
by: Jeff Gaines | last post by:
I have just installed VS 2005 (MSDN version) and I am having problems coping files to the Projects folder while VS2005 is running. The projects folder is on a network share and I have used...
8
by: Brennus | last post by:
I have a dll/so which embeds python. I can verify it works by compiling it as an executable and adding an appropriate main. I tried to write unit tests for this library with ctypes and a simple...
3
by: David Mason | last post by:
Hi. I am using vs2005 professional and have just built a website on my local machine. I have just copied it to another computer on the network where I store all my projects but now I can't...
3
by: Bardo | last post by:
Hi all, We are trying to debug an assembly which was built in debug configuration on our build server. The output window of visual studio indicates that no symbols are being loaded for the...
8
by: Peter | last post by:
I will excute the code below to get MethodName array. These codes are edited under VS2003. Now I want to upgrade it to VS2005,but VS2005 gives me a varning message: The varible "sSourceMethodName"...
2
by: Steve Marshall | last post by:
When I installed VS2005 on my own computer I nominated VB as the default language. I have also worked on VS2005 on another computer where C# was the default language. But sometimes I want to use...
2
by: Jeff | last post by:
Hey In VS2005 I've copied some text to the clipboard, but when I paste it, I get something I previuosly added to the clipboard. I thought a reboot of my computer would help, but it didn''t.......
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.