VS在F5运行一个启动项目时报错,,一堆的dll cannot find 

\msorlib.dll   Cannot find or open the PDF file
\PresentationFramework.dll  Cannot find or open the PDF file。。。

 

原因是:

项目中的各个工程生成的dll都被复制到另一个目录output/bin下:

VS报错 XXX.dll   Cannot find or open the PDF file 原因

copy "$(TargetPath)" "$(SolutionDir)..\output\bin\" /y 

 

但是新建的工程了一个工程,也设置了Build Event,也就是说也将生成的dll或exe复制到了output/bin目录下
然后F5启动该工程报错

\msorlib.dll   Cannot find or open the PDF file
\PresentationFramework.dll  Cannot find or open the PDF file.....

 

原因是:

在F5调试的时候,启动的是该工程自己目录下的exe

应该在属性->调试中修改成启动外部程序,如下图,这样便不会报错

VS报错 XXX.dll   Cannot find or open the PDF file 原因

相关文章: