SubSonic circuit errors

I am running VS2008 in .net 3.5 and trying to get SubSonic 2.2 running. My database is called Test, the table in the database is called TestTable. It runs on SQL Server 2005. I get the following "warnings":

Could not find schema information for SubSonicService.

Could not find schema information for the defaultProvider attribute.

Could not find schema information for item providers.

Could not find schema information for element "clear".

Could not find schema information for add element.

Could not find schema information for attribute 'name'.

Could not find schema information for attribute 'type'.

Could not find schema information for attribute 'connectionStringName'.

Could not find schema information for attribute 'generatedNameSpace'.

The problem is that the namespace is not being created, so I cannot work much. The line "SubSonic.Generated.Tables" will intellisence the name of my table, so I know it can connect and obviously does SOMETHING. But I cannot refer to my tables as classes. Below I've included a "warnings" link in the web.config section.

<SubSonicService defaultProvider="GeekPower">
    <providers>
      <clear/>
      <add name="GeekPower" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="GeekPower" generatedNameSpace="GeekPower" />
    </providers>    
  </SubSonicService>

      

Any help would be greatly appreciated. I've searched for hours, but no fixes I found work.

Thanks!

0


a source to share


5 answers


Do you have any classes in your project that create a namespace conflict with the generating classes? Try to regenerate with a different namespace like GeekPower.Foo.



0


a source


You might want to see:



Especially if you are just starting out.

Good luck!

0


a source


Did you actually create the classes using sonic.exe? This will create .cs files, which you then import into your project. To get rid of the warnings, add this to the top of your .config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <configSections>
    <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false" />
  </configSections>
</configuration>

      

0


a source


These warnings are because XML does not recognize configuration as Jason said. You can ignore them - or you can tweak the config on .NetConfiguration / v3.5

0


a source


Hmm. Sorry to reopen this guy, but I think we can nail him and he doesn't seem to have been nailed yet.

I have exactly the same issue with warnings, and almost exactly the same configuration. My DAL works great, builds, there is nothing wrong in broad terms, but I get warnings on every project I've ever used SubSonic on. This is an annoyance, nothing more, but an annoyance that I would like to get rid of.

If I add

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

      

or v3.5, into the config as suggested, I just get additional messages

Message 1 Could not find schema information for item ' http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration '

or the like, so that's not a problem. This is not a configuration file per se, but only a SubSonicService section.

The original posts seem to be reasonable - there must be some kind of file (XML Schema?) That tells VS the tags that are allowed in the SubSonicService section, and will presumably provide us with much needed Intellisense as well. This file is missing. Is this just a "do not disturb" case? (Rob? - no sneak, by the way, we were all there!) If so, can someone point me to a fairly simple set of instructions on how to create a file and apply it, and I'll do it and share it.

0


a source







All Articles