I'm working with WPF. When I'm trying to declare
The invocation of the constructor on type 'TestWPF.MainWindow' that matches the specified binding constraints threw an exception.
InnerException: Make sure that the file is a valid .NET Framework assembly.
I fixed the problem by adding the below content in
<configuration> <startup useLegacyV2RuntimeActivationPolicy="true" /> </configuration>
I found this via a community addition by user FCAA below the article " Troubleshooting Exceptions: System.IO.FileLoadException" on MSDN.