Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 12, 2011 06:12 AM by Fitmation
Member
593 Points
430 Posts
Jul 12, 2011 03:34 AM|LINK
I have already used using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
but it said does not exist in current context.
Contributor
3566 Points
824 Posts
Jul 12, 2011 04:01 AM|LINK
For the dll reference u have added .., go the properties and change Copy Local to true and try
Jul 12, 2011 06:12 AM|LINK
all ent lib are copy local true already. However, the same error
will it be caused by the original ent lib in web client version is not same as ent lib 5?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.EnterpriseLibrary.Data.Sql; using System.Data.Common; using System.Diagnostics; using Microsoft.Practices.EnterpriseLibrary.Logging; using Microsoft.Practices.EnterpriseLibrary.Logging.Filters; using Microsoft.Practices.EnterpriseLibrary.Logging.ExtraInformation; namespace TestWebClient.Shell.Repository { partial class FoodDataSet { private static FoodDataSet _instance; private static object _lockObject = new object(); internal static FoodDataSet Instance { get { if (_instance == null) { lock (_lockObject) { if (_instance == null) { _instance = CreateLoaded(); } } } return _instance; } } private static FoodDataSet CreateLoaded() { FoodDataSet ds = new FoodDataSet(); string selectSQL = "Select * from Orders"; Database defaultDB = EnterpriseLibraryContainer.Current.GetInstance<Database>("LocalSqlServer"); ds = defaultDB.ExecuteDataSet(CommandType.Text, selectSQL); /* Assembly currentAssembly = Assembly.GetExecutingAssembly(); using (Stream dataStream = currentAssembly.GetManifestResourceStream("MVPQuickstart.Contacts.Repository.CustomersData.xml")) { ds.ReadXml(dataStream); } */ return ds; } } }
Fitmation
Member
593 Points
430 Posts
EnterpriseLibraryContainer does not exist in web client factory
Jul 12, 2011 03:34 AM|LINK
I have already used
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
but it said does not exist in current context.
suresh_g_v20...
Contributor
3566 Points
824 Posts
Re: EnterpriseLibraryContainer does not exist in web client factory
Jul 12, 2011 04:01 AM|LINK
For the dll reference u have added .., go the properties and change Copy Local to true and try
Fitmation
Member
593 Points
430 Posts
Re: EnterpriseLibraryContainer does not exist in web client factory
Jul 12, 2011 06:12 AM|LINK
all ent lib are copy local true already. However, the same error
will it be caused by the original ent lib in web client version is not same as ent lib 5?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.EnterpriseLibrary.Data.Sql; using System.Data.Common; using System.Diagnostics; using Microsoft.Practices.EnterpriseLibrary.Logging; using Microsoft.Practices.EnterpriseLibrary.Logging.Filters; using Microsoft.Practices.EnterpriseLibrary.Logging.ExtraInformation; namespace TestWebClient.Shell.Repository { partial class FoodDataSet { private static FoodDataSet _instance; private static object _lockObject = new object(); internal static FoodDataSet Instance { get { if (_instance == null) { lock (_lockObject) { if (_instance == null) { _instance = CreateLoaded(); } } } return _instance; } } private static FoodDataSet CreateLoaded() { FoodDataSet ds = new FoodDataSet(); string selectSQL = "Select * from Orders"; Database defaultDB = EnterpriseLibraryContainer.Current.GetInstance<Database>("LocalSqlServer"); ds = defaultDB.ExecuteDataSet(CommandType.Text, selectSQL); /* Assembly currentAssembly = Assembly.GetExecutingAssembly(); using (Stream dataStream = currentAssembly.GetManifestResourceStream("MVPQuickstart.Contacts.Repository.CustomersData.xml")) { ds.ReadXml(dataStream); } */ return ds; } } }