Compartir en:

Dealing with VSIX extension projects that must work with Visual Studio 2013 and Visual Studio 2012 is not for the faint-hearted. Sometime you mess up in the most innocent way.

I still don’t know why, and I am not sure if I will ever know, but sometimes a mistaken upgrade from Framework 4.0 to 4.5 and back is not entirely innocent. If you did that or had to perform major surgery in your project, you may stumble upon the following errors even if you have everything in place:

  • Cannot find all types required by the ‘async’ modifier. Are you targeting the wrong framework version, or missing a reference to an assembly?
  • Predefined type ‘System.Runtime.CompilerServices.IAsyncStateMachine’ is not defined or imported
  • Cannot find all types required by the ‘async’ modifier. Are you targeting the wrong framework version, or missing a reference to an assembly?

There is a high chance your references were mess-up in the process. If you are lucky and the following line is not in the .csproj; you may solve it adding the following line:

<Reference Include="System.Threading.Tasks">
    <HintPath>..\..\packages\Microsoft.Bcl.1.1.3\lib\net40\System.Threading.Tasks.dll</HintPath>
</Reference>

Took me a day to figure it out, hoping this helps.

  • Federico Lois

    Investigación y Desarrollo Tecnológico - Fundador

    Especializado en Arquitecturas de Integración y Diseño de Aplicaciones en organizaciones de tecnología. Su interés por los desafíos lo ha llevado a transitar por caminos como el desarrollo de motores 3D, el análisis de imágenes utilizando hardware gráfico y "beWeeVee", un framework de desarrollo de aplicaciones co-operativas. Fanático de l

Dejar un comentario