1

I download a project from github: https://github.com/HEskandari/FarsiLibrary/zipball/master

I open this with visual studio 2010, This Solution contain a project with name "FarsiLibrary.WPF.VisualStudio.Design", this project contain references to assemblies in .Net 3.5 and visual studio not recognize Microsoft.Windows.Design.* assemblies because this assemblies exist in .Net 3.5.

So when i changing Target Framework to 3.5 unfortunately this changing not reflected and then target framework set again to .Net 4 automatically.

I want to know how to handle it to build without any problem?

Thank.

Reza ArabQaeni
  • 4,848
  • 27
  • 46
  • 1
    Have you installed Framework 3.5 on your machine? I can build solutions targetting both 3.5 and 4 with VS 2010 and I have no problem... Just be sure your 3.5 assemblies don't reference 4.0 assemblies – Kek Jul 03 '12 at 08:24
  • Oh, right, i don't install framework 3.5. How to upgrade this without dependency to framework 3.5? – Reza ArabQaeni Jul 03 '12 at 08:33
  • I think you need to change reference and target assembly Microsoft.Windows.Design.* in extension (not directly in Framework)... but I'm not sure about this. Or you could install Framework 3.5 – Kek Jul 03 '12 at 08:53

1 Answers1

0

Run PEVerify or corflags to determine whether FarsiLibrary.WPF.VisualStudio.Design is mixed mode or a pure .NET application.

If it is a mixed mode assembly, add this to your app config file:

configuration>
   <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0"/>
   </startup>
</configuration>

Or even better, recompile FarsiLibrary.WPF.VisualStudio.Design targetting .NET 4.0.

Community
  • 1
  • 1
Jirka Hanika
  • 13,301
  • 3
  • 46
  • 75