title: Looks like MSVS 11.0 Beta spoiled a MSVS 10.0 installation
body: <p>I ran into compilation problems with my MSVS 10 after installing MSVS 11Beta. Now, when I compile my C# Projects in MSVS 10 (Projects created in MSVS 10; Target framework: 3.5), I get errors <code>MSB4216</code>, <code>MSB4028</code> with following text in output window:</p>
  
  <pre><code>1&gt;Task "GenerateResource" skipped, due to false condition; ('%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2') was evaluated as ('Resx' == 'Resx' and '' != 'false' and 'CLR2' != 'CLR2').
  1&gt;Task "GenerateResource"
  1&gt;  Launching task "GenerateResource" from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" in an external task host with a runtime of "CLR2" and a process architecture of "x86".
  1&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2199,5): error MSB4216: Could not run the "GenerateResource" task because we could not create or connect to a task host with runtime "CLR2" and architecture "x86".  Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NetFX 4.0 Tools\MSBuildTaskHost.exe" exists.
  1&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2217,7): error MSB4028: The "GenerateResource" task's outputs could not be retrieved from the "FilesWritten" parameter. Object does not match target type.
  1&gt;Done executing task "GenerateResource" -- FAILED.
  </code></pre>
  
  <p>How can I fix these errors?</p>
  
  <p><em><strong>EDIT:</em></strong> </p>
  
  <ol>
  <li>Mentioned file "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NetFX 4.0 Tools\MSBuildTaskHost.exe" exists.</li>
  <li>C++ projects are compling without problems.</li>
  <li>Reinstalling VS10 doesn't solve the problem.</li>
  <li>This is <code>GenerateResource</code> task, that must compile resx-file, but generates an exception:</li>
  </ol>
  
  <p><code>
      &lt;!-- But we can't use those parameters if we're targeting 3.5, since we're using the 3.5 task --></code></p>
  
  <pre><code>&lt;GenerateResource
      Sources="@(EmbeddedResource)"
      UseSourcePath="$(UseSourcePath)"
      References="@(ReferencePath)"
      AdditionalInputs="$(MSBuildAllProjects)"
      NeverLockTypeAssemblies="$(GenerateResourceNeverLockTypeAssemblies)"
      StateFile="$(IntermediateOutputPath)$(MSBuildProjectFile).GenerateResource.Cache"
      StronglyTypedClassName="%(EmbeddedResource.StronglyTypedClassName)"
      StronglyTypedFileName="%(EmbeddedResource.StronglyTypedFileName)"
      StronglyTypedLanguage="%(EmbeddedResource.StronglyTypedLanguage)"
      StronglyTypedNamespace="%(EmbeddedResource.StronglyTypedNamespace)"
      StronglyTypedManifestPrefix="%(EmbeddedResource.StronglyTypedManifestPrefix)"
      PublicClass="%(EmbeddedResource.PublicClass)"
      OutputResources="@(EmbeddedResource-&gt;'$(IntermediateOutputPath)%(ManifestResourceName).resources')"
      MSBuildRuntime="$(GenerateResourceMSBuildRuntime)"
      MSBuildArchitecture="$(GenerateResourceMSBuildArchitecture)"
      Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2'"&gt;
  </code></pre>
  
  <ol>
  <li>I tried to <a href="http://blogs.msdn.com/b/visualstudio/archive/2010/07/06/debugging-msbuild-script-with-visual-studio.aspx">debug</a> MSBuild script (<code>.csproj</code>). Just before the fatal <code>GenerateResource</code> task I checked all the <em>properties</em> and <em>items</em>. There was nothing about "8.0A" but only about "7.0A"</li>
  </ol>