Page 1 of 1

Build errors in Visual Studio 2010

Posted: Thu Feb 25, 2010 5:30 pm
by sloDavid
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?

Re: Build errors in Visual Studio 2010

Posted: Sat Feb 27, 2010 1:28 am
by afm
Use Web Site Project, not Web Application Project.

Re: Build errors in Visual Studio 2010

Posted: Wed Mar 03, 2010 8:23 pm
by sloDavid
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)

Re: Build errors in Visual Studio 2010

Posted: Wed Mar 03, 2010 10:20 pm
by afm
Make sure the target framework is 3.5 (I think 3.0 works too).

Re: Build errors in Visual Studio 2010

Posted: Thu Sep 30, 2010 1:09 pm
by myvo04
sloDavid--were you able to get this running in Visual Studio 2010 as a web application project rather than a web site project?

Re: Build errors in Visual Studio 2010

Posted: Thu Sep 30, 2010 2:46 pm
by sloDavid
No.

Re: Build errors in Visual Studio 2010

Posted: Fri Oct 01, 2010 10:26 am
by myvo04
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?

Re: Build errors in Visual Studio 2010

Posted: Fri Oct 01, 2010 10:30 am
by sloDavid
Oh. Maybe that's the thing. I *don't* "build" it. I just use it as-is.

Re: Build errors in Visual Studio 2010

Posted: Sun Nov 07, 2010 9:57 am
by Vasil4
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.

Re: Build errors in Visual Studio 2010

Posted: Tue Nov 16, 2010 6:35 pm
by triplw
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>

Re: Build errors in Visual Studio 2010

Posted: Fri Nov 19, 2010 4:53 am
by pongguru
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"/>

Re: Build errors in Visual Studio 2010

Posted: Wed May 11, 2011 6:34 pm
by msnellenburg
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?

Re: Build errors in Visual Studio 2010

Posted: Thu May 12, 2011 6:13 am
by jmestep
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.