ref. : http://cosmicice.blogspot.com/2009/03/solving-compile-errors-cs0006-cs0009-in.html
Recently, when I was trying to run any web application project, I was getting the following error message:
CS0006: Metadata file 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll' could not be found
So, I searched the net for solution, and this is how I was able to solve it:
First, check whether "System.EnterpriseServices.dll" file actually exists at that folder or not. You cannot navigate to the GAC_32 folder using windows explorer. You have to use command line to go there. From start menu, select 'Run' > type 'cmd' press enter. then directly go there:
cd C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a
press enter. then use dir /p command to see all files in it and search for the "System.EnterpriseServices.dll" file if you cannot find it there, then again go to this location:
cd C:\Windows\Microsoft.NET\Framework\v2.0.50727
press enter. From here you have to copy the file to the desired location. Use this command:
copy System.EnterpriseServices.dll C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a
Now try to run that web project from visual studio, and it should work. If it doesnt work, and gives you another error: CS0009 compile error, then you have to copy all the files to that folder. First navigate to that source folder:
cd C:\Windows\Microsoft.NET\Framework\v2.0.50727
press enter. Then use this command to copy all DLLs:
copy *.dll C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a
You dont need to overwrite any file that already exists at the destination folder. This should solve CS0009 error.
이광세 (Lee, Gwang-Se)
School of Mechanical Engineering, Pusan National University
(Wind Turbine Noise & Broadband Airfoil-Self Noise)
lee.gse@gmail.com / gs.lee@pusan.ac.kr / twitter.com/leegse
댓글 없음:
댓글 쓰기