Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception from HRESULT: 0x80070057 (E_INVALIDARG)

I have a WPF application . While building it I am getting the following error:

Could not load file or assembly or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Application is trying to load the assembly from virtual drive (as debug Folder)

Ex: [subst r: c:[my Assembly bin pth]

Earlier I was mounting c:\bin as a netwwork drive and was getting te following error.

This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information.

Edit: I am not able to find the Unblock button in properties window by the way.

like image 585
Simsons Avatar asked Feb 14 '13 09:02

Simsons


Video Answer


2 Answers

Clear out the temporary framework files for your project in:

For Windows 7, the path is:

C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files\ 

For 64 bit systems with 'Framework' in the path the full path is:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\ 

http://www.solutioncottage.com/ShowSolution.aspx?solID=59

like image 191
Anupam Roy Avatar answered Oct 05 '22 18:10

Anupam Roy


Removing all temp files from the path below still works, it saved my development site hosted on a web server from (HRESULT: 0x80070057 (E_INVALIDARG))

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\

like image 41
Ryan Boken Avatar answered Oct 05 '22 19:10

Ryan Boken