We use Web Deployment Projects in order to easily deploy to our different environments (Dev/Staging/Production) using web.config replacement to manage our connection strings. When I tried to set up a wdproj project, I got errors on any line that tried to reference ASP.insert_usercontrol_here_ascx, since the ASP namespace is a compile-time pseudo namespace. If I switched the option "Allow precompiled site to be updatable", the user control errors went away, but I then started seeing namespace/classname collisions. I've also tried the different compilation options, to no avail. Is there a way to get web dep. projects to work with AC without any major coding changes? Otherwise, since the whole reason we do this is connection string management/deployment, is there a different recommended approach to organizing the different connection strings for each environment?
Also note that these same errors occur when using the built-in Publish feature in VS2008, since I believe both are using the same precompiler.
Note: We do NOT want to deploy uncompiled sites, so that is not an option.
Using Web Deployment Projects with AC
-
- Ensign (ENS)
- Posts: 2
- Joined: Tue Oct 05, 2010 10:40 am
Re: Using Web Deployment Projects with AC
Can you point to exact location where you saw these errors, means those user control names. Is this something which is happening out of the box or you added these new controls. I think this happens only with user controls where you don't use the code behind file. If you have this problem on any control then you can try creating a code behind for that control and compile it again hopefully this will fix it.
-
- Ensign (ENS)
- Posts: 2
- Joined: Tue Oct 05, 2010 10:40 am
Re: Using Web Deployment Projects with AC
This is out of the box. The errors (sample at the bottom) start out in CreateOrder4.aspx, but eventually any and all references to the ASP namespace will need to be changed (\Admin\Payment\Methods.aspx.cs, \Admin\People\Groups\Default.aspx.cs, \Admin\Products\GiftWrap\EditWrapGroup.aspx.cs, \Admin\Store\Currencies\Default.aspx.cs, \ConLib\OnePageCheckout.ascx.cs, \ConLib\PaymentPage.ascx.cs, and \ConLib\PayMyOrderPage.ascx.cs).
In all I would guess there are about 40 lines that need to be changed just to remove the references to the ASP namespace, let alone some of the referenced controls may need to be associated with a Namespace in order to be referenced. The problem with me changing this code is that any future version upgrade will be a nightmare, as the code will need to be changed again and again - unless it is corrected in the next version. Can we assume this will be a part of the next version and make the changes manually for now?
A sample of the compilation error:
Error 1 The type or namespace name 'admin_orders_create_creditcardpaymentform_ascx' does not exist in the namespace 'ASP' (are you missing an assembly reference?) C:\folderstructure\Website\Admin\Orders\Create\CreateOrder4.aspx.cs 243
In all I would guess there are about 40 lines that need to be changed just to remove the references to the ASP namespace, let alone some of the referenced controls may need to be associated with a Namespace in order to be referenced. The problem with me changing this code is that any future version upgrade will be a nightmare, as the code will need to be changed again and again - unless it is corrected in the next version. Can we assume this will be a part of the next version and make the changes manually for now?
A sample of the compilation error:
Error 1 The type or namespace name 'admin_orders_create_creditcardpaymentform_ascx' does not exist in the namespace 'ASP' (are you missing an assembly reference?) C:\folderstructure\Website\Admin\Orders\Create\CreateOrder4.aspx.cs 243
Re: Using Web Deployment Projects with AC
Well I have created an entry for this to be verified and resolved in our future versions if issue exists, but we can't assure you that it will be in next version. In order to keep upgrade easy for a modded website you should read following thread, perhaps you can do something like this to make things easier.viewtopic.php?f=47&t=10082
-
- Ensign (ENS)
- Posts: 1
- Joined: Thu Mar 31, 2011 1:07 pm
Re: Using Web Deployment Projects with AC
I just downloaded the newest version and I'm having this same issue. Do you know if there is a fix for this problem?