NOTE: I have done exhaustive research on this question, there are many supposed solutions out there, none of which have actually worked for me.
After successfully installing a windows service onto a clients computer, I notice that it doesn't start automatically as it is supposed to. When I try to start it manually, I get the error above. I took a look at the Events Viewer log, and here is the error logged there: "Service cannot be started. System.IO.FileNotFoundException: Could not load file or assembly "assemblyname.dll" or one of it's dependencies. The specified module could not be found"
It turns out that my .dll, even though I can see it in the installation folder (I did the side-by-side), the system is not able to connect to it. Someone suggested making sure the application file name and the config file name match, mine already did, and my service is set to run on the Local System Account. NOTE: Everything works fine on the dev box, and the client machine has the requisite 4.5 .NET framework for the service to run.
QUESTION: How can I correct this? How can I make sure the system on the client machine is able to see the .dll file that the service uses?
Any help is appreciated here. Let me know if further clarification is needed.
Thanks
Possible solution
Try compiling it in x86, could be a 64-bit dll, make sure you have the 32-bit version.
OK guys I finally solved my problem. I ran dependency walker and It gave me a list of dlls that were missing, but it turned out they had nothing to do with the dll I was using. But I decided to install Windows SDK for Win 7 with the redistributables, and this solved the problem i was having. There you have it folks, hope this helps someone else going forward. Cheers!
I've been using Microsoft Visual C# 2008 Express Edition for the past two years. I made some very slight changes to a single project last night and now want to open the project and make a couple of changes. Out of the blue I'm getting the following message when I try to load the project:
Unable to read the project file 'myfile.csproj' Could not load file or assembly 'sorttbls.nlp' or one of its dependencies. Incorrect function. (Exception from HRESULT: 0x80070001)
The above message stops me from accessing any part of the project. (I am able to load the source code in Notepad so at least I don't have to worry about losing the code altogether). This error does not seem to be associated to any recent changes to my code as I run into this error when open up a simple console project or try to create a new project. What happened? (Did my computer get infected with a virus?) How do I get past this?
Thanks!
May be you can use following source
sorttbls.nlp Problem
According to which you can uninstall and install .Net 2 or 3.5 and perform Reboot
If you have ATI card above link might solve your problem
I'm having a bit of a problem running an AWS Console Application created in VS2010, on the cloud, on the EC2.
When ran on my desktop, it poses no problems, but, when moved to the cloud, it thrown an error saying that it cannot find the AWSSDK.dll.
I changed the path of the references, so that it would mimic the folder structure on the cloud, but that didn't work.
I tried to put another copy of the dll in the application folder and hoped for a miracle, but that didn't work either.
The last thing I tried was to load the dll manually with the AssemblyResolve, but that didn't work either.
Thanks, Catalin
you may visit here
http://aws.amazon.com/sdkfornet/
stick with the style of the code sample
i was tried previously and success =D
I'm attempting to load an icon based on a selected file:
Icon iconForFile = System.Drawing.Icon.ExtractAssociatedIcon(filename);
When I run this code locally through VS, everything works fine. However, after I deploy/install the application that contains this code, I get an error message:
"[My Program] - Unable to locate Component:
This application has failed to start because libapr_tsvn.dll was not found. Re-installing the application may fix this problem."
Strangely enough, once I click OK, my program continues to run as expected, and the Icon object is set/displays correctly. Searching around shows that this may be a dll from Tortoise SVN, which I use for version control. Any thoughts?
I get the feeling that this has nothing at all to do with extracting icons - your project has the libapr_tsvn.dll file referenced, and this reference needs to be removed.
Turns out it was a problem with Tortoise SVN. I updated to the latest version a few days ago, didn't restart, and continued working.
My application allows the user to drag-and-drop files into a listview. It appears that a hook for SVN runs when a drap-and-drop action occurs; since Tortoise wasn't properly installed, this hook failed and gave me the error message. Proving once again, always restart...
I'm working on a moderately sized WebForms project. Due to the peculiarities of management here, I have to upload the site to a remote server in order to test (no localhost testing). I'm using the 'Publish' command in Visual Studio 2008. Sometimes, it even works. Most of the time, I inexplicably get a "publish failed" in the bottom left corner, with no further details.
The few googled articles/forum posts I read suggested making the target local folder for the publish operation readable/writable for everyone. Doesn't help.
Is there are way to get further details as to WHY a publish fails in VS2008, and if not, is there a better way of doing these deployments? I'm spending more time building/pushing to the web server than actually debugging.
It's worth checking the output window. I've just had a publish fail because I had deleted an image outside of VS so VS was complaining that the image couldn't be found, but this information was only displayed in the output window.
See this link for more information:
http://ericfickes.com/2009/08/find-out-why-visual-studios-publish-fails/
It happens to us when there is an error in markup (!). Bad thing is that VS will just swallow the error and just tell you Failed.
What I suggest is to run your publish from command line using MSBuild. It's not that straightforward but it works (once you get into it).
I've since discovered that the reason for these particular publish failures was due the "Delete Existing Files" option being checked. Using Visual Studio 2008 under a non-administrative account on Windows Vista could cause a permissions error while attempting to delete the existing files. The publish would fail silently after encountering a file that Visual Studio had insufficient access to delete. Once the files were deleted manually outside of Vidual Studio, the publish functioned normally.
I have not had this issue with Windows 7; I assume the UAC changes in Windows 7 fixed the problem.
I mostly work with Web Forms, and I encounter this problem daily.
It seems to me that publish fails when it fails to delete a file it is trying to replace. Even if I don't have any files open, it still fails sometimes. Not sure why.
Not only VS publish fails very often, it is painfully slow as well.
I just publish to empty local directory and use separate FTP client to upload files. It's more work, but works.
This is probably not the case for you, but I've seen this happen when I'm publishing a web site. If the app_offline.htm file is not excluded from your project (if you use this file), the publish will fail.
Same happened to me.. what I did was include images files that was not included in the project and delete images that were not used.
After struggling with a similar issue for about 30 mins with no clue as to what was causing it closed down VS and reopened my project. Started working fine. No idea why but it worked.
You should always stop the IIS instance running on the machine your are publishing to. Google the word "iisreset". Other hosting providers like DiscountAsp and Arvixe offer you tools to "Stop" and "Start" your app pool on their IIS remotely. This is very necessary because IIS may have locked some files as "in use", so your publish fails when it tries to write over them. When your publish is complete, then just restart IIS (or press "Start" from a web tool if you're using a 3rd party hosting provider).
When all else fails, check your "Output" window (the tab to the right of your "Error List" at the bottom of Visual Studio). Scroll through all of it after a failed publish and look for anything that says "Unable to add". If you keep seeing the same "Unable to add" errors on the same publish, then ftp into the folder, delete the the problematic files manually, and try publishing again.
I got this when my ProjectName.Publish.xml file was read-only. Once I checked the file out of source control, I no longer got the error and could publish.
Just to add to this thread, I found that, for some bizarre reason, only the Mercurial files were being published to the server, everything else just wasn't being copied across.
Another strange thing was that only the Debug configuration was available; Release was nowhere to be seen.
After reading other threads around S.O., I found that there were many for VS 2010 and 2012, but not much to cover the same problem with 2008.
The fix, I found, was to delete the [solution].suo file and then attempt a publish. That seemed to do the job, though it took a long time to complete.
What I found and work in my case. It is to use a different version of VS.
I recently had the problem, the solution works perfectly in VS2015 build, compile and tested.
However, when I try to publish was failing silently.
So, I closed the solution and open it with VS2017 that use the same file structure for the projects/solutions. Then rebuild it and publish without any problems.
I believe it could be VS related and it is complicated to debug.
This is a workaround if you work with multiple Vs instances in your local machine.