How can I load an older version of a .NET assembly?

后端 未结 5 1049
梦如初夏
梦如初夏 2021-01-05 07:28

I have a WPF/C# application that references .NET 4.0 assemblies. However, within the application is a text editor that needs to display C# intellisense tied to .NET 3.5 asse

5条回答
  •  南方客
    南方客 (楼主)
    2021-01-05 08:01

    By default, you cannot load assemblies made for previous versions of the .NET framework on the .NET framework version 4.

    However, there is a configuration attribute that allows that: http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx

    Put the following lines in your app.config file:

    
         
        
    
    

    There are reasons why this is not active by default, but I believe that it should be appropriate for your use.

提交回复
热议问题