現在甲方采購的ArcGIS Desktop正版,一般都是較高的版本(10.4或10.4.1),但10.4經常報出C++ Runtime R6034錯誤。
問題
"Microsoft Visual C++ Runtime Library"
Runtime Error!
Program: C...
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
桌面端解決
官方說這確實是一個bug,下載補丁程序,安裝后即可解決:
https://soft.ctfile.com/info/azP392513
開發時解決
但開發時,在調用GP時仍然會彈出此窗;經測試,需要修改配置文件解決,具體方法如下:
新建一個應用程序清單文件:
在其中加入如下代碼:
<!--防止彈出Runtime Error R6034錯誤窗體-->
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.vc90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/>
</dependentAssembly>
</dependency>
另外,調用GP時有時會報如下錯誤,但不影響結果,解決方法是在arcgis安裝目錄下拷備GpMetadataFunctions.dll到程序目錄,然后引用即可:
"未能加載文件或程序集"GpMetadataFunctions, Version=10.4.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86"或它的某一個依賴項。系統找不到指定的文件"。