我在编译使用 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
请问如何解决这个问题?谢谢你。