将我的应用程序从WP8升级到WP8.1时出错

时间:2014-05-26 06:41:49

标签: silverlight windows-phone-8 upgrade windows-phone-8.1

我收到以下错误

 Error 5  The "GenerateResource" task failed unexpectedly.
 System.InvalidOperationException: Item named 'themes/generic.xaml' of
 type 'System.IO.UnmanagedMemoryStream' cannot be added to the resource
 file because it is not serializable.    at
 Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo
 reader, IResourceWriter writer)    at
 Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo
 reader, String filename)    at
 Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile,
 String outFileOrDir)    at
 Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log,
 ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean
 sourcePath, String language, String namespacename, String
 resourcesNamespace, String filename, String classname, Boolean
 publicClass, Boolean extractingResWFiles, String resWOutputDirectory) 
 at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper
 log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs,
 Boolean sourcePath, String language, String namespacename, String
 resourcesNamespace, String filename, String classname, Boolean
 publicClass, Boolean extractingResWFiles, String resWOutputDirectory) 
 at Microsoft.Build.Tasks.GenerateResource.Execute()    at
 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
 at
 Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
 WPAPP

我无法弄清楚出了什么问题?

2 个答案:

答案 0 :(得分:1)

看起来你正在使用从WP8到WP8.1的某些dll或类似内容的引用,但在WP8.1中不支持。请从项目中删除该引用。

答案 1 :(得分:1)

删除System.windows.controls的引用对我来说很有用。