I am developping a windows phone 8.1 sdk
When I use vs 2013 update 3,the code works and i can run my demo.
but,yesterday,I update my vs 2013 to update 4,then throw a System.TypeLoadException
code details below:
var swapChainPanel = new SwapChainPanel();
Children.Add(swapChainPanel);
var res = new CXMapResource("", "");
cxEngine = new CXMapEngine(res);
Type CXMapResource is a windows runtime component type written by c++
and it is the first winrt type I load in my code
I set a break point before this line,it goes here,and then continue,then crash,
output:
A first chance exception of type 'System.TypeLoadException' occurred in Com.AMap.winmd
A first chance exception of type 'System.Exception' occurred in WP8.1Demo.ni.EXE
Update at 2014 11 18 16:08
System.TypeLoadException was unhandled by user code
HResult=-2146233054
Message=Requested Windows Runtime type 'WinRTDXMapLib.CXMapResource' is not registered.
Source=mscorlib
TypeName=WinRTDXMapLib.CXMapResource
StackTrace:
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at WinRTDXMapLib.CXMapResource..ctor(String EngineResourcePath, String ShaderResourcePath)
at Com.AMap.Maps.Core.AmapSharpEngine..ctor()
at Com.AMap.Api.Maps.AMapControl..ctor()
at WP8._1Demo.MainPage..ctor()
at WP8._1Demo.WP8_1Demo_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
at WP8._1Demo.WP8_1Demo_XamlTypeInfo.XamlUserType.ActivateInstance()
InnerException: System.Runtime.InteropServices.COMException
HResult=-2147221164
Message=Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
ErrorCode=-2147221164
InnerException:
I let my college run the same code in vs 2013 update 2,and it works
please tell me what might result in this problem,give me some advice,Thanks!!
It works now!
VS 2013 UPDATE5 CTP2