Search code examples
c#visual-studio-2010xna

XNA Visual Studios 2010 unusual deploy errors


Recently, I've been having 3 unusual errors when I try to deploy my projects. I know XNA is basically obsolete, but I started this game a long time ago and I want to finish it using XNA. I can't deploy on the WP7 emulator or on any device. I'm running on W8.1. I've worked on the same project for a while, on the same OS, and had no problems. But all of a sudden, I started having these errors. I didn't really change anything significant on the recent changes I made. These are the errors.

1) The "FilesToFilter=@(ReferenceSatellitePaths)" parameter for the "FilterItemsBySupportedCultures" task is invalid.

2) The "FilterItemsBySupportedCultures" task failed unexpectedly. System.ArgumentException: Object of type 'Microsoft.Build.Framework.ITaskItem[]' cannot be converted to type 'Microsoft.Build.Framework.ITaskItem[]'. at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr) at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) at Microsoft.Build.Execution.TaskFactoryWrapper.SetPropertyValue(ITask task, TaskPropertyInfo property, Object value) at Microsoft.Build.BackEnd.TaskExecutionHost.InternalSetTaskParameter(TaskPropertyInfo parameter, Object parameterValue)

3)The "FilterItemsBySupportedCultures" task could not be initialized with its input parameters.


Solution

  • If you use VS 2010 Express for Windows Phone you needed to edit the file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\VPDExpress.exe.config

    Add this at the very top of bindings after probing tag

    <dependentAssembly> <assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="12.0.0.0-14.0.0.0" newVersion="4.0.0.0"/> </dependentAssembly>

    Worked for me. Works with installed VS2013 and VS2015.

    P.S. You need to edit file on the desktop to have the permission to write file and then copy it to the needed location.