VS2010下编译错误(C#)

超级网迷+ 电脑迷+ 音乐迷
打印 被阅读次数
如果在VS2010下编译时出现下面的错误:

“Cannot embed interop types from assembly 'vjslib.dll' because it is missing either the 'ImportedFromTypeLibAttribute' attribute or the 'PrimaryInteropAssemblyAttribute' attribute”


下面的方法或许管用:
"Right click on the project in the solution explorer window in order to bring up the context menu. This will give a number of options, but you want the final option, which you can see from the attached "PropertiesSolutionExplorer" image. Then, it will probably open to the last tab you used, but make sure you are on "Application" tab which is visible at the top of the tabs that are on the left side of the dialog. Right click on the drop-down arrow for the "Target framework:" and choose .Net Framework 4.0, not .Net Framework 4.0 Client (which is the default). Anyway, hopefully this post will make more sense." (Check the link)
登录后才可评论.