last day (15 days later) » 

3:48 PM
0
Q: .net: How to clean up corrupted assembly being referenced?

Richard77I shut down computer without closing running programs. Now when I run my application on localhost, I'm getting the following error: Could not load file or assembly 'FluentDateTime' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) I'v...

 
lrb
These files are like an assembly build "cache". You can safely delete all files in, for example, C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\ folder. They will be recreated on the next build.
 
Just to confirm what you are saying. Everything that comes after Temporary ASP.NET Files\ can be safely deleted.
 
lrb
Yes, you probably should leave the temp root folder -->\Temporary ASP.NET Files\
 
Why leave that one. Any particular reason?
 
lrb
It was there after the .NET installation (empty). I am sure that msbuild will not crash if the temp folder has been removed and it would be recreated, however, you have to stop deleting somewhere.
 
3:48 PM
I've deleted those files and built the solution, but those files have not been recreated.
 
lrb
So your problem has been solved?
 
No. I've deleted the entire content inside the following folder C:\Users\username\AppData\Local\Temp\Temporary ASP.NET Files and C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files. I've left root folder but emptied its content. When I build, none of the deleted files are being recreated and I'm still getting the same error: Could not load file or assembly 'FluentDateTime' ...
 
lrb
Don't worry about the contents not being recreated. It does its own thing and puts files there when needed. Nothing is being created there because you haven't had a successful build. At least you ruled out this being a temp folder issue.
Have you tried deleteing the files in the project\<Debug||Release>\bin?
Also, what library is FluentDateTime.dll from? You might want to remove that library/package from your project and then add it again from Nuget. To make sure you have the correct version for the framework and that you are not mixing and matching package files.
 
I've removed/re-added reference to FluentDateTime.dll through Nuget, still without any success. I'll try now deleting project\<Debug||Release>\bin. In addition to Debug and Release folders, I've also x64 folder, which itself contains Debug and Release folders. Should I delete the x64 folder as well?
 
4:24 PM
As I just wrote previously, removing/adding back the reference to FluentDateTime didn't solve the problem. Deleting content in Debug/Release didn't change the outcome either.
 
 
2 hours later…
lrb
6:09 PM
You can delete the bin folder. The bin directory in your project folder will get re-created if it does not exist. To make it simple, just select and deleted everything in <PROJECT>/bin and/or <PROJECT>/<CONFIGURATION>/bin.
 
 
1 hour later…
7:25 PM
I've cleaned up the bin folder without success. I've updated the thread with the output, hopefully it will be helpful.
 
 
1 hour later…
lrb
8:45 PM
Can you check and see if the FluentDateTime.dll is in your bin after the build. If it is then right click on it for details. Does the version match what is in your web.config file? Do you have FluentDateTime any where in a web.config file?
 

last day (15 days later) »