.net ";GenerateResource“;Windows通用项目中出现错误,任务未经验证而失败

.net ";GenerateResource“;Windows通用项目中出现错误,任务未经验证而失败,.net,visual-studio-2013,win-universal-app,.net,Visual Studio 2013,Win Universal App,我在构建应用程序时遇到以下错误。知道是什么原因导致的吗,或者如何修复 错误“GenerateResource”任务意外失败 System.IO.FileLoadException:无法加载文件或程序集的file:///C:\WINDOWS\Microsoft.Net\assembly\GAC\U MSIL\Microsoft.Build.Tasks.Core\v4.0\u 14.0.0.0\uUu b03f5f7f11d50a3a\Microsoft.Build.Tasks.Core.dll'或

我在构建应用程序时遇到以下错误。知道是什么原因导致的吗,或者如何修复

错误“GenerateResource”任务意外失败

System.IO.FileLoadException:无法加载文件或程序集的file:///C:\WINDOWS\Microsoft.Net\assembly\GAC\U MSIL\Microsoft.Build.Tasks.Core\v4.0\u 14.0.0.0\uUu b03f5f7f11d50a3a\Microsoft.Build.Tasks.Core.dll'或其依赖项之一。不支持该操作。(来自HRESULT的异常:0x8013155)

文件名:'file:///C:\WINDOWS\Microsoft.Net\assembly\GAC\U MSIL\Microsoft.Build.Tasks.Core\v4.0\U 14.0.0.0\Uuu b03f5f7f11d50a3a\Microsoft.Build.Tasks.Core.dll'-->System.NotSupportedException:试图从网络位置加载程序集,这将导致该程序集在早期版本的.Net中被沙盒化此版本的.NET Framework默认情况下不启用CAS策略,因此此负载可能很危险。如果此加载不是为了沙箱程序集,请启用loadFromRemoteSources开关。有关更多信息,请参阅

在System.Reflection.RuntimeAssembly.\n加载(AssemblyName文件名、字符串代码基、证据assemblySecurity、RuntimeAssembly位置提示、StackScrawMark和stackMark、IntPtr pPrivHostBinder、Boolean throwOnFileNotFound、Boolean for Inspection、Boolean suppressSecurityChecks)

位于System.Reflection.RuntimeAssembly.nLoad(AssemblyName文件名、字符串代码基、证据assemblySecurity、RuntimeAssemblyLocationHint、StackScrawlMark和stackMark、IntPtr pPrivHostBinder、Boolean throwOnFileNotFound、Boolean For Inspection、Boolean suppressSecurityChecks)

位于System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef,证据assemblySecurity,RuntimeAssembly reqAssembly,StackScrawMark&stackMark,IntPtr pPrivHostBinder,Boolean throwOnFileNotFound,Boolean For Inspection,Boolean suppressSecurityChecks)

位于System.Reflection.RuntimeAssembly.InternalLoadFrom(字符串汇编文件、证据安全性证据、字节[]哈希值、AssemblyHashAlgorithm哈希算法、Boolean ForInspection、Boolean suppressSecurityChecks、StackScrawMark和stackMark)

位于System.Reflection.Assembly.LoadFrom(字符串assemblyFile,证据securityEvidence)

位于System.Activator.CreateInstanceFromInternal(字符串汇编文件、字符串类型名、布尔型ignoreCase、BindingFlags bindingAttr、Binder Binder、对象[]args、CultureInfo区域性、对象[]ActivationAttribute、证据安全信息)

位于System.AppDomain.CreateInstanceFrom(字符串汇编文件,字符串类型名)

位于System.AppDomain.CreateInstanceFromAndUnwrap(字符串assemblyName,字符串typeName)

位于System.AppDomain.CreateInstanceFromAndUnwrap(字符串assemblyName,字符串typeName)

在Microsoft.Build.Tasks.GenerateResource.Execute()中

位于Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ItaskeExecutionHost.Execute()


在Microsoft.Build.BackEnd.TaskBuilder.d_u1.MoveNext()雀巢.WindowsPhone上,这是Windows10 9879版本的一个bug。在中找到的一种解决方法是手动修改C:\Program Files(x86)\MSBuild\14.0\Bin\MSBuild.config并添加以下部分:

<configuration>
   <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>
</configuration>

这在今天仍然是个问题