Build errors in Visual Studio 2010

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
sloDavid
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Feb 25, 2010 12:34 pm

Build errors in Visual Studio 2010

Post by sloDavid » Thu Feb 25, 2010 5:30 pm

Installed AbleCommerce 7.0.4, and applied the hotfixes. Runs fine in my local IIS. But I get build errors.

Here's my steps:
1. I created a Visual Studio 2010 RC Web Application project (.NET 3.5), and added all the files.
2. I added project references to all the DLLs in the bin folder, but two would not add:
  • CybsWSSecurity.dll
  • lpssl.dll
3. Whenever I try to either "build" or "debug", I get the following errors. (The namespace errors each happen several times. Here I've only listed the first instance of each.)
  • Type 'Admin_UserControls_SendMail' already defines a member called 'Page_Load' with the same parameter types. (\Admin\People\Users\SendMail.aspx.cs)
  • The type or namespace name 'PersistentItemEventHandler' could not be found. (\Admin\People\Groups\AddGroupDialog.ascx.cs)
  • The type or namespace name 'ISearchSidebarAware' could not be found. (\ConLib\SearchPage.ascx.cs)
  • The type or namespace name 'ISearchSidebar' could not be found. (\ConLib\CategorySearchSidebar.ascx.cs)
  • The type or namespace name 'CheckingOutEventHandler' could not be found. (\Admin\Orders\Create\PurchaseOrderPaymentForm.ascx.cs)
  • The type or namespace name 'CheckedOutEventHandler' could not be found. (\Admin\Orders\Create\PurchaseOrderPaymentForm.ascx.cs)
  • The type or namespace name 'PersistentItemEventArgs' could not be found. (\Admin\Store\Currencies\Default.aspx.cs)
Has anybody done this successfully? I will want to change the code-behind of some of the pages, and expect that I'll need the ability to rebuild the website. Checking the class view, I can confirm that I'm successfully referencing the CommerceBuilder.Common namespace (which contains IPersistable, PersistableEventArgs and PersistableEventHandler, but nothing about a "PersistentItem").

Does anybody know what namespace those types should be in?

I nixed the first error by commenting out the empty Page_Load method in SendMail.aspx.cs, but I don't see why I should have needed to. Is there another file defining the same class, and having a function by the same name?

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: Build errors in Visual Studio 2010

Post by afm » Sat Feb 27, 2010 1:28 am

Use Web Site Project, not Web Application Project.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

sloDavid
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Feb 25, 2010 12:34 pm

Re: Build errors in Visual Studio 2010

Post by sloDavid » Wed Mar 03, 2010 8:23 pm

Thank you. But when I do so, I get the following error:
  • The name 'ScriptManager' does not exist in the current context. (\App_Code\PageHelper.cs, line 522)
When I change that line to use "page.ClientScript" instead of "ScriptManager", I eliminate that one error, but several additional errors show up:
  • The 'CodeFile' attribute cannot be used without an 'Inherits' attribute. (\Admin\Catalog\AddCategory.aspx)
    NOTE: I do have an Inherits attribute.
  • The type or namespace name 'UpdatePanel' does not exist in the namespace 'System.Web.UI'. (\Admin\UserControls\SendMail.ascx & LoginDialog.ascx, among others)
  • The type 'System.Web.UI.IScriptcontrol' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (\Admin\Dashboard\AdminWebpartsPanel.ascx.cs)
  • The type or namespace name 'ScriptManager' does not exist in the namesapce 'System.Web.UI'. (\Admin\Admin.master)
  • The type or namespace name 'UpdateProgress' does not exist in the namesapce 'System.Web.UI'. (\Admin\Admin.master)

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: Build errors in Visual Studio 2010

Post by afm » Wed Mar 03, 2010 10:20 pm

Make sure the target framework is 3.5 (I think 3.0 works too).
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

myvo04
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 29
Joined: Thu Apr 24, 2008 8:14 am

Re: Build errors in Visual Studio 2010

Post by myvo04 » Thu Sep 30, 2010 1:09 pm

sloDavid--were you able to get this running in Visual Studio 2010 as a web application project rather than a web site project?

sloDavid
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Feb 25, 2010 12:34 pm

Re: Build errors in Visual Studio 2010

Post by sloDavid » Thu Sep 30, 2010 2:46 pm

No.

myvo04
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 29
Joined: Thu Apr 24, 2008 8:14 am

Re: Build errors in Visual Studio 2010

Post by myvo04 » Fri Oct 01, 2010 10:26 am

I tried getting this to work as a web application project as well and didn't have any luck. I've resorted to trying to get the cart to run as a web site project but I get the same error you did about the ScriptManager.
  • The name 'ScriptManager' does not exist in the current context (\App_Code\PageHelper.cs, line 523)
I tried implementing the change you described above by using "page.ClientScript" in place of "ScriptManager", but end with a different error.

Code: Select all

page.ClientScript.RegisterClientScriptBlock(page, typeof(string), "EditHTML", js, true);
  • No overload for method 'RegisterClientScriptBlock' takes '5' arguments (\App_Code\PageHelper.cs, line 523
Did you have to change the target framework? Were any other changes made so that your VS could build your site error-free?

sloDavid
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Feb 25, 2010 12:34 pm

Re: Build errors in Visual Studio 2010

Post by sloDavid » Fri Oct 01, 2010 10:30 am

Oh. Maybe that's the thing. I *don't* "build" it. I just use it as-is.

Vasil4
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Sun Nov 07, 2010 9:42 am

Re: Build errors in Visual Studio 2010

Post by Vasil4 » Sun Nov 07, 2010 9:57 am

After 4 hours of trying to get Visual Studio 2010 to compile a copy of Able Commerce 7.0.5 I was able to get it to work. I first found out that you will need to create an Empty Website using the 3.5 Framework and not a Project in Visual Studio. After that I copy all the AC files and pasted them into my Visual Studio Website solution. I then right clicked on the solution name and went to properties. I then changed the framework to 3.0 Framework and clicked apply. I then closed out of properties and went back into it and changed it back to the 3.5 Framework and exited out and it built project successfully. I am guessing that when you switch back and forth from the frameworks, it rewrites some needed things in the Web Config file but I don't know what exactly. I hope this helps.
Vasilios Nassis
Web 2 Market
vnassis@web2market.com

User avatar
triplw
Commander (CMDR)
Commander (CMDR)
Posts: 144
Joined: Sat Jan 12, 2008 5:34 pm
Contact:

Re: Build errors in Visual Studio 2010

Post by triplw » Tue Nov 16, 2010 6:35 pm

I got rid of the "The name 'ScriptManager' does not exist in the current context." error by adding a couple assemblies in the web.config.

Code: Select all

<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Design, 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.Windows.Forms, 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.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>

User avatar
pongguru
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Sun Nov 14, 2010 6:07 am

Re: Build errors in Visual Studio 2010

Post by pongguru » Fri Nov 19, 2010 4:53 am

What Vasil4 said is the right way to handle this. If you are running your site in a debug environment, you require a site solution.

When I upgraded the application to asp.net 4.0, I had the problem again. I had to add the following to resolve it. Thanks triplw.

Code: Select all

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

msnellenburg
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Sat Apr 30, 2011 12:54 pm

Re: Build errors in Visual Studio 2010

Post by msnellenburg » Wed May 11, 2011 6:34 pm

Hi Guys,
I have been trying to get my Able Commerce 7.0.7 website to run on .Net Framework 4.0.
I followed the few instructions that Able Commerce had in the upgrade notes for .net 4.0 framework.

I am also using Visual Studio 2010.
When compiling my site I get the following errors:

"
Error 1 Circular file references are not allowed. C:\inetpub\wwwroot\MirkaMusic\Admin\Orders\Payments\RefundPayment.aspx 1
"
"
Error 2 Circular file references are not allowed. C:\inetpub\wwwroot\MirkaMusic\Admin\Orders\Payments\EditPayment.aspx 1
"

"
Error 3 Circular file references are not allowed. C:\inetpub\wwwroot\MirkaMusic\Admin\Orders\Payments\CancelRecurringPayment.aspx 1
"
"
Error 4 Circular file references are not allowed. C:\inetpub\wwwroot\MirkaMusic\Admin\Orders\Payments\VoidPayment.aspx 1
"
"
Error 5 Unknown server tag 'uc:AccountDataViewport'. C:\inetpub\wwwroot\MirkaMusic\Admin\Orders\PaymentManager.aspx 266
"

Can anyone guide me on:
A website setup/configuration for:
The Web.Config File,
or anything else that could solve my errors as shown above, please?

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Build errors in Visual Studio 2010

Post by jmestep » Thu May 12, 2011 6:13 am

That is a bug in Able 7.0.7 even when compiled in .net 4. Able has worked on a patch for it, but I'm not sure it's publicly posted yet.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply