Enterprise Library for .NET Framework 2.0 - January 2006

R

rockdale

hi, I just downloaded Microsoft Enterprise Library Jan 2006 and try to
integrate it into my asp.net application. As i am going to connect to
mySQL database, I need to include the source code in my project so that
I can debug better. But I all those examples I found are reference the
compiled dll only.

What are the steps to include the source code of Microsoft Enterprise
Library into my project?

I created a new dir and copy Microsoft Enterprise Library source code
under my new dir.

But when I put

using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

in my class. I got error
The type or namespace name "Practices" does not exist in the namespace
"Microsoft"( are you missing an assembly reference?)

Also, I just noticed that there is no namespace in your class in
VS2005?

As I need to connect to MySQL and MSSQL, I put
<connectionStrings>
<add name="MSSQL"
providerName="System.Data.SqlClient"
connectionString= "myCOnnectionString" />

<add name="MySql"
providerName="System.Data.SqlClient"
connectionString="myConnectionString" />
</connectionStrings>
<dataConfiguration
defaultDatabase="MSSQL"/>

into my web.config file, but I got error - could not find schema
information for the attribute "defaultDatabase"
Does DAAB has its own config file, if it has, where and what's the name
of the config file. Do I need to put this configuration into config
file that DAAB


Please bear with me since I just upgrade to VS2005 from VS2003

Thanks a lot
-rockdale
 
S

Siva M

Include the entprise library source projects in your (Visual Studio)
solution and then add reference to those projects from yours (that is ent
lib projects and yours should be in the same solution).

hi, I just downloaded Microsoft Enterprise Library Jan 2006 and try to
integrate it into my asp.net application. As i am going to connect to
mySQL database, I need to include the source code in my project so that
I can debug better. But I all those examples I found are reference the
compiled dll only.

What are the steps to include the source code of Microsoft Enterprise
Library into my project?

I created a new dir and copy Microsoft Enterprise Library source code
under my new dir.

But when I put

using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

in my class. I got error
The type or namespace name "Practices" does not exist in the namespace
"Microsoft"( are you missing an assembly reference?)

Also, I just noticed that there is no namespace in your class in
VS2005?

As I need to connect to MySQL and MSSQL, I put
<connectionStrings>
<add name="MSSQL"
providerName="System.Data.SqlClient"
connectionString= "myCOnnectionString" />

<add name="MySql"
providerName="System.Data.SqlClient"
connectionString="myConnectionString" />
</connectionStrings>
<dataConfiguration
defaultDatabase="MSSQL"/>

into my web.config file, but I got error - could not find schema
information for the attribute "defaultDatabase"
Does DAAB has its own config file, if it has, where and what's the name
of the config file. Do I need to put this configuration into config
file that DAAB


Please bear with me since I just upgrade to VS2005 from VS2003

Thanks a lot
-rockdale
 
R

rockdale

Thanks;

Did what you told, still get errors

Error 1 Metadata file 'C:\WorkSpace\Microsoft Enterprise Library
January
2006\Src\Configuration\Design\bin\Release\Microsoft.Practices.EnterpriseLibrary.Configuration.Design.dll'
could not be found

Should not I move the EntLib directory from Program Files to my
directory "workspwace"?

Thanks again
-rockdale
 
S

Siva M

Check that the ent.lib projcts have been compiled. Try building the complete
solution (menu Build |Rebuild Solution...).

Thanks;

Did what you told, still get errors

Error 1 Metadata file 'C:\WorkSpace\Microsoft Enterprise Library
January
2006\Src\Configuration\Design\bin\Release\Microsoft.Practices.EnterpriseLibrary.Configuration.Design.dll'
could not be found

Should not I move the EntLib directory from Program Files to my
directory "workspwace"?

Thanks again
-rockdale
 
R

rockdale

That's what I did, but got no luck.
As I right click on my project and then add reference, I can see all
those block are in the reference list.

This was what I did

right click on my solution, add ->exist projects...
then Add Existing Project window popup
change Fies or Type to sulotion Files(*.sln)

Then choose EnterpriseLibrary.sln under Microsoft Enterprise Library
directory. (This directory is not the destination directory when I
installed the EntLib, I copied it to the same directory with my project
since I do not want it residents under program files)


What did I do wrong?

Thanks a lot
-rockdale
 
R

rockdale

I also tried to add Data, Common and ObjectBuilder 3 csProj only, still
got the same error

Any idea?
-rockdale
 
R

rockdale

With these 3 blocks, I right click on common and rebuild it, succeed.
right click on ObjectBuilder and rebuild succeed.
But right click on Data and rebuild failed with error


Error 1 The type or namespace name 'Common' does not exist in the
namespace 'Microsoft.Practices.EnterpriseLibrary' (are you missing an
assembly reference?) C:\WorkSpace\Microsoft Enterprise Library January
2006\src\Data\Instrumentation\DataInstrumentationListenerBuilder.cs


Please help
 
R

rockdale

I figured it out. You still need to add the reference for these
projects. e.g I have to add
\debug\Microsoft.Practices.EnterpriseLibrary.Common.dll and
\debug\Microsoft.Practices.EnterpriseLibrary.ObjectBuilder.dll to
project Data.
Don't know is it the right solution, but it works.

-thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top