I would like to use VS.NET (2008 Web Developer Express ed.) to edit user controls, config files and such. It does however not work very smoothly, so I thought I'd hear you guys/galls how you usually work with your Umbraco sites in VS.NET ? (Umbraco v4.0.2.1)
The problems I experience is that I can not build the site, because there are all sorts of "leftover" files in the data folder, and Umbraco-packages that does not build in the context of VS.NET. I open the site as a "website" without a project, so it is impossible to exclude the offending files and folders (ok, there is the "exclude from project" option, but doing that on every single file to exclude is not really realistic ;-)
When working on user controls I build them in a separate project and on build add them to my umbraco website (via a post build event) and then test the umbraco site, this works smoothly for me.
"Hope I didn't misunderstand your question." No, not entirely :-) Building the user controls in seperate projects as you suggest would probably work fine. But for very simple controls I would prefer to just keep them dymanically compiled for the sake of simplicity.
But the errors are actually not related to my user controls, it is the extra packages that I have installed (examples below from Blog4Umbraco and UmbImport). I assume others must experience the same problems, since these packages are quite popular.
Examples of errors when building
1./
(note - translated, so might not be the exact message - my VS.NET is in another language)
Error 2: The virtual path '/masterpages/Master.master' is already connected to another project, which is not allowed. C:\websites\XYZ\Corporate\www_corporate\masterpages\Blog.master 1
2./
The data in the UmbImport package causes the build to fail - says it is missing the codebehind class. (I have removed it know, so I do not have the exact phrase from VS.NET). The data folder is not meant to be compiled, but if you open it as a "website" in VS.NET it is impossible to exclude folders (afaik).
See basically while using user controls what we do is that we wrap them in another project and run on .aspx page. let's say you have Blog.ascx than code for the same and than use that in separate page called "Blog.aspx", and than test them thoroughly.
Once that is done, wrap the same in macro and place the ascx file in user control folder of your umbraco website.
So there are two steps.
1) Create User controls in separate project, test them using aspx page.
2) Deploy the user control in macro and use the same.
This is perfect scenario for me, no matter how many packages are installed.
I get a similar issue as you when it comes to this error: Error 2: The virtual path '/masterpages/Master.master' is already connected to another project, which is not allowed. C:\websites\XYZ\Corporate\www_corporate\masterpages\Blog.master 1
Mainly, when you edit any of the master pages in Umbraco it removes the ~ from before the /masterpages/master.master. Then when I try to debug the program, I get an error stating that it can't find the master pages. I add the ~ back in....and then I can debug the site.
Problem is, if I'm editting a lot of the master pages, it gets really annoying having to add the ~ back in.
Unfortunately, I haven't spent the time to find a solution yet.
Working with Umbraco site in VS.NET
I would like to use VS.NET (2008 Web Developer Express ed.) to edit user controls, config files and such. It does however not work very smoothly, so I thought I'd hear you guys/galls how you usually work with your Umbraco sites in VS.NET ? (Umbraco v4.0.2.1)
The problems I experience is that I can not build the site, because there are all sorts of "leftover" files in the data folder, and Umbraco-packages that does not build in the context of VS.NET. I open the site as a "website" without a project, so it is impossible to exclude the offending files and folders (ok, there is the "exclude from project" option, but doing that on every single file to exclude is not really realistic ;-)
I'm not 100% sure what you're asking.
When working on user controls I build them in a separate project and on build add them to my umbraco website (via a post build event) and then test the umbraco site, this works smoothly for me.
To edit the config files, you can install http://our.umbraco.org/projects/config-tree which allows you to edit them within the Umbraco UI.
There's some excellent videos on Umbraco.tv regarding Usercontrols and the post event setting.
Hope I didn't misunderstand your question.
Rich
"Hope I didn't misunderstand your question."
No, not entirely :-) Building the user controls in seperate projects as you suggest would probably work fine. But for very simple controls I would prefer to just keep them dymanically compiled for the sake of simplicity.
But the errors are actually not related to my user controls, it is the extra packages that I have installed (examples below from Blog4Umbraco and UmbImport). I assume others must experience the same problems, since these packages are quite popular.
Examples of errors when building
1./
(note - translated, so might not be the exact message - my VS.NET is in another language)
Error 2: The virtual path '/masterpages/Master.master' is already connected to another project, which is not allowed. C:\websites\XYZ\Corporate\www_corporate\masterpages\Blog.master 1
2./
The data in the UmbImport package causes the build to fail - says it is missing the codebehind class. (I have removed it know, so I do not have the exact phrase from VS.NET). The data folder is not meant to be compiled, but if you open it as a "website" in VS.NET it is impossible to exclude folders (afaik).
Example of datafolder:
data/7157fa47-c2df-46c3-a34a-931e71a40881/
Well i don't exactly get you point.
Here i am explaining you my views.
See basically while using user controls what we do is that we wrap them in another project and run on .aspx page. let's say you have Blog.ascx than code for the same and than use that in separate page called "Blog.aspx", and than test them thoroughly.
Once that is done, wrap the same in macro and place the ascx file in user control folder of your umbraco website.
So there are two steps.
1) Create User controls in separate project, test them using aspx page.
2) Deploy the user control in macro and use the same.
This is perfect scenario for me, no matter how many packages are installed.
I hope it helps.
Regards,
Jigar
I get a similar issue as you when it comes to this error: Error 2: The virtual path '/masterpages/Master.master' is already connected to another project, which is not allowed. C:\websites\XYZ\Corporate\www_corporate\masterpages\Blog.master 1
Mainly, when you edit any of the master pages in Umbraco it removes the ~ from before the /masterpages/master.master. Then when I try to debug the program, I get an error stating that it can't find the master pages. I add the ~ back in....and then I can debug the site.
Problem is, if I'm editting a lot of the master pages, it gets really annoying having to add the ~ back in.
Unfortunately, I haven't spent the time to find a solution yet.
is working on a reply...