Page 1 of 1
Missing namespace references?
Posted: Fri Sep 05, 2008 10:32 am
by mshaw
I am trying to get ac7 setup on my pc. I have searched the forums and have not found an answer to following errors when trying to compile the website in visual studio.
The type or namespace name 'ASP' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'PersistentItemEventArgs' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'CheckedOutEventArgs' could not be found (are you missing a using directive or an assembly reference?)
Any help in resolving this is appreciated.
Re: Missing namespace references?
Posted: Fri Sep 05, 2008 9:52 pm
by mazhar
Did you modify something? There is no such problem with default application package. It seems that visual studio is unable to find the definitions for both event arguments classes. Give a try by refreshing the bin folder contents with the bin contents from default package. Also could you please post the line of code where following problem occurs
Re: Missing namespace references?
Posted: Mon Sep 08, 2008 8:35 am
by mshaw
No I did not modify anything. I first created a new project in VS 2008, using 2.0 framework. Then I added all of the existing files from the zip file source for ac7. I refreshed all of the assemblies in the bin folder from the source zip files.
Here are the error lines
rror 1 The type or namespace name 'PersistentItemEventHandler' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Taxes\AddTaxRuleDialog.ascx.cs 18 18
Error 2 The type or namespace name 'PersistentItemEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Marketing\Email\ManageList.aspx.cs 42 58
Error 3 The type or namespace name 'ASP' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\CategoryGridPage.ascx.cs 28 5
Error 4 The type or namespace name 'PersistentItemEventHandler' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Taxes\EditTaxRuleDialog.ascx.cs 19 18
Error 5 The type or namespace name 'ASP' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\SearchPage.ascx.cs 27 5
Error 6 The type or namespace name 'CheckedOutEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\OnePageCheckout.ascx.cs 1074 36
Error 7 The type or namespace name 'CheckingOutEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\OnePageCheckout.ascx.cs 1128 37
Error 8 The type or namespace name 'ASP' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\CategoryGridPage3.ascx.cs 30 5
Error 9 The type or namespace name 'CheckingOutEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\PayMyOrderPage.ascx.cs 493 37
Error 10 The type or namespace name 'PersistentItemEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\People\Users\Default.aspx.cs 48 50
Error 11 The type or namespace name 'PersistentItemEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Marketing\Email\Default.aspx.cs 19 65
Re: Missing namespace references?
Posted: Tue Sep 09, 2008 1:28 am
by mazhar
Well it seems like that it may be due to some missing assembly reference. Make sure that the pages having error must have the using statements or fully qualified names for these classes and there is no broken assembly reference.
Re: Missing namespace references?
Posted: Tue Sep 09, 2008 8:35 am
by mshaw
What is ASP and CheckedOutEventArgs referring to? We did not change any code, this is what was already in the code.
Re: Missing namespace references?
Posted: Tue Sep 09, 2008 11:55 am
by afm
mshaw wrote:No I did not modify anything. I first created a new project in VS 2008, using 2.0 framework. Then I added all of the existing files from the zip file source for ac7. I refreshed all of the assemblies in the bin folder from the source zip files.
Here are the error lines
rror 1 The type or namespace name 'PersistentItemEventHandler' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Taxes\AddTaxRuleDialog.ascx.cs 18 18
Error 2 The type or namespace name 'PersistentItemEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Marketing\Email\ManageList.aspx.cs 42 58
Error 3 The type or namespace name 'ASP' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\CategoryGridPage.ascx.cs 28 5
Error 4 The type or namespace name 'PersistentItemEventHandler' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Taxes\EditTaxRuleDialog.ascx.cs 19 18
Error 5 The type or namespace name 'ASP' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\SearchPage.ascx.cs 27 5
Error 6 The type or namespace name 'CheckedOutEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\OnePageCheckout.ascx.cs 1074 36
Error 7 The type or namespace name 'CheckingOutEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\OnePageCheckout.ascx.cs 1128 37
Error 8 The type or namespace name 'ASP' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\CategoryGridPage3.ascx.cs 30 5
Error 9 The type or namespace name 'CheckingOutEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\ConLib\PayMyOrderPage.ascx.cs 493 37
Error 10 The type or namespace name 'PersistentItemEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\People\Users\Default.aspx.cs 48 50
Error 11 The type or namespace name 'PersistentItemEventArgs' could not be found (are you missing a using directive or an assembly reference?) C:\Projects\\\Admin\Marketing\Email\Default.aspx.cs 19 65
I have not seen the zip source file, so I'm just guessing...
All of the files you listed are part of the website. The website could be its own project in Visual Studio, using the Web Site Project. Try this:
1. Start over by creating your AC site. Make sure the site is working. Do not add any other source files.
2. Start Visual Studio and select File > Open Web Site. Select Local IIS, navigate to the AC site, and then click on Open. Visual Studio will create a Web Site Project and automatically add all of the web site files.
3. Run the web site from Visual Studio to make sure it created the project correctly.
4. Look in the web site bin directory and notice that several CommerceBuilder assemblies are used. Those are the assemblies that you will build from source.
5. Extract the zipped source code to some other location (not to the website). Select File > Add > Existing Project from the Visual Studio menu. Navigate to the CommerceBuilder project you extracted from the source zip file and add the project to your solution. Now Visual Studio will show 2 projects in the Solution Explorer: your web site, and the CommerceBuilder project.
6. Select the web site project and then select Add Reference. From the Projects tab, select the CommerceBuilder project. Now your solution is using your custom version of the CommerceBuilder assembly.
I hope that helps. I don't have the source, so I'm mostly guessing, but it sure looks like how AC structured the solution.