c# - 窗口电话7错误

标签 c# windows-phone-7 compiler-errors runtime-error

我有一个工作正常的项目,但今天却收到此错误...即使在创建新项目时,我也会收到相同的消息...我不明白问题是什么...

Error   1   The "CompileXaml" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
File name: 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)

The Zone of the assembly that failed was:
MyComputer
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, 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.LoadFrom(String assemblyFile)
   at Microsoft.Silverlight.Build.Tasks.CompileXaml.LoadSilverlightAssemblies(String[] frameworkPaths)
   at Microsoft.Silverlight.Build.Tasks.CompileXaml.GenerateCode(ITaskItem item, Boolean isApplication)
   at Microsoft.Silverlight.Build.Tasks.CompileXaml.Execute()
   at Microsoft.Build.Framework.ITask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

最佳答案

卡尔·萨尔达尼亚的最佳答案(阅读评论)

需要重新安装...

关于c# - 窗口电话7错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13802820/

相关文章:

c# - 全景和枢轴控制之间的区别

c++ - C++ 11统一初始化(即列表初始化)不与继承一起编译

visual-c++ - c_src\bcrypt_nif.c(94): error C2275: 'ERL_NIF_TERM' : illegal use of this type as an expression

c# - 使用 LINQ 在 XML 中查询具有相同名称的嵌套元素

c# - 在 Silverlight 中调整 LineHeight for Windows Phone 7 应用程序

c# - 调整生成的相机流的大小

java - 需要帮助向学生解释概念

c# - Orchard CMS : Adding default data to fields and then querying them

c# - c#中的日期计算

c# - 带字符串键的 GetHashCode()