File (or assembly) can't be found after changing project's .NET target-framework from 4.0 to 3.5

前端 未结 3 1514
北海茫月
北海茫月 2021-01-21 09:02

I want to change my C# project, which is based on the .NET 4.0 to 3.5. So I changed the project\'s target-framework to 3.5.

After re-opening and trying to compile the pr

3条回答
  •  情歌与酒
    2021-01-21 09:47

    I had this error when I installed a COM component in NET 4.5 then downgraded to NET 4.0. Removing and adding the reference made no difference.

    I found this helpful.

    * Solution or Workaround Change the default Platform Target CPU to allow applications to run on 64-bit machines. *

    http://forums.arcgis.com/threads/19335-COM-Exception-was-unhandled-and-Class-not-registered

    The NET 4.0 target environment for me is 32bit, so I get the Target CPU down to x86 in the properties window. Now it runs.

提交回复
热议问题