VS2012中的Javascript运行时错误

VS2012中的Javascript运行时错误,javascript,visual-c++,visual-studio-2012,windows-8,windows-runtime,Javascript,Visual C++,Visual Studio 2012,Windows 8,Windows Runtime,我在编译使用visual studio 2012 windows运行时组件项目创建的windows 8应用程序时遇到了一个问题。我用HTML 5、JavaScript和C++开发这个应用程序。但是当我编译这个项目时,我得到了一个错误,那就是JavaScript运行时错误:DLL中的错误 我不知道如何修复此问题,当我构建此项目时,我会遇到如下错误:- Error 40 Loading assembly "D:\workspace\Test\apps\Test\windows8\native\

我在编译使用visual studio 2012 windows运行时组件项目创建的windows 8应用程序时遇到了一个问题。我用HTML 5、JavaScript和C++开发这个应用程序。但是当我编译这个项目时,我得到了一个错误,那就是JavaScript运行时错误:DLL中的错误

我不知道如何修复此问题,当我构建此项目时,我会遇到如下错误:-

Error   40  Loading assembly "D:\workspace\Test\apps\Test\windows8\native\Debug\WindowsRuntimeComponent1\WindowsRuntimeComponent1.dll" failed. System.IO.FileLoadException: Could not load file or assembly 'WindowsRuntimeComponent1.dll' or one of its dependencies. This operation is only valid in the context of an application container. (Exception from HRESULT: 0x8007109A)
File name: 'WindowsRuntimeComponent1.dll'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.UnsafeLoadFrom(String assemblyFile)
   at Microsoft.Build.Tasks.ProcessResourceFiles.ReadAssemblyResources(String name)
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets 383 9   Test

请问如何解决这个问题?谢谢。

这看起来根本不像javascript运行时错误。您是在创建windows应用商店应用程序还是组件?在我看来就像一个组件,然后我的问题是,你能提供更多关于项目结构和引用程序集的信息吗?此外,您是否收到警告和其他错误?您正在使用第三方库吗?这可能是问题所在:D:\workspace\。。。。?您是否有可能尝试在外部驱动器上运行应用程序?只是检查一下:是的。我正在创建一个windows运行时组件,并且还收到一个警告,例如“您是否正在将sqlite添加到该组件?”?WinRT组件具有会导致sqlite库出现问题的限制。如果是,请将其拆下,看看是否存在问题。如果是,那就意味着你知道从哪里开始寻找。这个