找不到类型或命名空间名称'CrystalDecisions'(您是否缺少using指令或程序集引用? [英] The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?
问题描述
嗨朋友们,
我在http://www.sdn.sap.com/irj上安装Crystal Reports for Visual Studio 2010 - 完整包(EXE) / sdn / crystalreports-dotnet。
我添加参考,
CrystalDecisions.CrystalReports.Engine
CrystalDecisions。 ReportSource
CrystalDecisions.Shared
CrystalDecisions.Windows.Forms
CrystalDecisions.VSDesigner in
Hi friends,
I install Crystal Reports for Visual Studio 2010 - Complete Package (EXE) on http://www.sdn.sap.com/irj/sdn/crystalreports-dotnet.
I add reference,
CrystalDecisions.CrystalReports.Engine
CrystalDecisions.ReportSource
CrystalDecisions.Shared
CrystalDecisions.Windows.Forms
CrystalDecisions.VSDesigner in
C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\
然后在我的项目中添加CrystalReport2.rpt。但是我收到了很多错误。
then add CrystalReport2.rpt in my project. but i got so many errors.,
Error 1 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 14 11 User
Error 2 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 15 11 User
Error 3 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 16 11 User
Error 4 The type or namespace name 'ReportClass' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 19 35 User
Error 5 The type or namespace name 'ICachedReport' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 93 52 User
Error 6 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\FeedbackReport.xaml.cs 14 7 User
Error 7 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 53 16 User
Error 8 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 61 16 User
Error 9 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 69 16 User
Error 10 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 77 16 User
Error 11 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 85 16 User
Error 12 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 131 24 User
Error 13 The type or namespace name 'RequestContext' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\CrystalReport2.cs 137 53 User
Error 21 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) D:\Jagadeeswaran\Project\User\User\obj\x86\Debug\FeedbackReport.g.cs 12 7 User
如何解决问题?
How to Solve the Problem?
Warning 14 The referenced assembly "CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. User
Warning 15 The referenced assembly "CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. User
Warning 16 The referenced assembly "CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. User
Warning 17 The referenced assembly "CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. User
Warning 18 The referenced assembly "CrystalDecisions.VSDesigner, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. User
Warning 19 The referenced assembly "CrystalDecisions.VSDesigner, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. User
Warning 20 The referenced assembly "CrystalDecisions.VSDesigner, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. User
如何解决问题?
How to Solve the Problem?
推荐答案
试试这个
作为By Ahmed Omer,将框架设置为4.0,而不是客户端版本。
也,设置你的平台到64位或32位,不是任何。
Try this
as By Ahmed Omer , set framework to 4.0 , not the client version.
also , set your platform to either 64 bit or 32 bit ,Not any.
转到项目的属性,
选择目标框架为.Net framework 4 >
和平台目标为x86或x64不使用任何。
go to the properties of your project,
choose Target framework as .Net framework 4
and Platform Target as x86 or x64 not use any.
您好Sagotharan Jagadeeswaran,
尝试这个
将Framework设置为4.0,而不是客户端版本。此外,将您的平台设置为X86或X64,而不是任何。
谢谢
Hi Sagotharan Jagadeeswaran,
try this
Set your Framework to 4.0, not the client version. Also, set your platform to either X86 or X64, not Any.
Thank you
这篇关于找不到类型或命名空间名称'CrystalDecisions'(您是否缺少using指令或程序集引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!