0
我有CA1017錯誤消息與StyleCop說我需要使它ComVisible錯誤。CA1017與VS2010 ComVisible相關的錯誤StyleCop
Error 18 CA1017 : Microsoft.Design :
Because 'NationalInstruments.Labview.FPGA.ModelsimCommunicator.dll' exposes externally
visible types, mark it with ComVisible(false) at the assembly level and then mark all
types within the assembly that should be exposed to COM clients with ComVisible(true).
然後,我把代碼[assembly: ComVisible(false)]
放在最頂層的命名空間之前。但是,我仍然遇到了與其他錯誤消息一樣的錯誤。
Error 19 The type or namespace name 'ComVisible' could not be found (are you
missing a using directive or an assembly reference?)
Error 20 The type or namespace name 'ComVisibleAttribute' could not be found (are
you missing a using directive or an assembly reference?)
看來VS2010也不認識這個名字。
這有什麼錯呢?