Subsonic 亚音速生成的类有以下错误-KimDal中不存在类型或命名空间名称

Subsonic 亚音速生成的类有以下错误-KimDal中不存在类型或命名空间名称,subsonic,Subsonic,我试图生成我的dal,但当我在VisualStudio2008中检查我的代码时,我得到一条消息“KimDal中不存在类型或命名空间名称” 我使用的是sql Expresss 2005,vs2008的完整版本,我建立了一个新的c#2.0网站 我安装了亚音速2.1安装程序,将其添加到我的外部工具中,我添加了对dll的引用,该dll将其和其他dll添加到我的bin文件夹中 我还添加了对system.web和system.configuration的引用,因为我看到这解决了其他人的问题 下面是我的配置,

我试图生成我的dal,但当我在VisualStudio2008中检查我的代码时,我得到一条消息“KimDal中不存在类型或命名空间名称”

我使用的是sql Expresss 2005,vs2008的完整版本,我建立了一个新的c#2.0网站

我安装了亚音速2.1安装程序,将其添加到我的外部工具中,我添加了对dll的引用,该dll将其和其他dll添加到我的bin文件夹中

我还添加了对system.web和system.configuration的引用,因为我看到这解决了其他人的问题

下面是我的配置,是我在查看类时在IntelSense中遇到的正常错误,还是我需要修复某些东西以及如何修复它

<configuration>
 <configSections>
  <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/>
 </configSections>
 <appSettings/>
 <connectionStrings>
  <!-- Development connection string -->
  <add name="kimWebApp" connectionString="Data Source=7NQ384J\SQLExpress;Initial Catalog=kim2;Integrated Security=True"/>
 </connectionStrings>
 <SubSonicService defaultProvider="kimWebAppProvider">
  <providers>
   <clear/>
   <add name="kimWebAppProvider" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="kimWebApp" generatedNamespace="KimDal"/>
  </providers>
 </SubSonicService>
 <system.web>
  <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
  <compilation debug="false" defaultLanguage="c#">
  </compilation>
  <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
  <authentication mode="Windows"/>
  <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
 </system.web>
 <system.codedom>
 </system.codedom>
 <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
 <system.webServer>
 </system.webServer>
</configuration>

不用担心,我现在已经可以工作了,并且能够生成代码,要做到这一点,我基本上必须做以下几点

创建一个如下所示的网络配置

<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
    <configSections>
        <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/>
    </configSections>
    <appSettings/>
    <connectionStrings>
        <add name="kimconnection" connectionString="Data Source=7NQ384J\SQLExpress;Initial Catalog=kim2;Integrated Security=True;"/>
    </connectionStrings>
    <SubSonicService defaultProvider="kimAppProvider">
        <providers>
            <clear/>
            <add name="kimAppProvider" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="kimconnection" generatedNamespace="kimdata"/>
        </providers>
    </SubSonicService>
    <system.web>
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <compilation debug="true" defaultLanguage="C#">
            <buildProviders>
                <add extension=".abp" type="SubSonic.BuildProvider, SubSonic"/>
            </buildProviders>
            <assemblies>
                <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
                <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
        <authentication mode="Windows"/>
        <pages>
            <controls>
                <add assembly="SubSonic" namespace="SubSonic" tagPrefix="subsonic"/>
            </controls>
        </pages>
        <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    </system.web>
</configuration>

我从安装的亚音速C:\Program Files\subsonic\subsonic 2.1 Final\src\subsonic Central复制了配置文件

根据我的需要进行了更改,然后我添加了对亚音速的引用,其中包括以下所有DLL。 Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.EnterpriseLibrary.Data.dll Microsoft.Practices.ObjectBuilder.dll MySql.Data.dll System.Data.SQLite.dll 亚音速.dll