This project is read-only.

can't build in vs2010

Topics: Core, Customizing Orchard
Oct 23, 2012 at 6:43 PM
Edited Oct 23, 2012 at 6:44 PM

I followed a tutorial to get started with orchard:


Now i couldn't send an email after posting a comment, and i wanted to debug the problem.

So i tried to open the site in vs2010.

it doesn't build, it gives me an error like this:

Error    1    The type or namespace name 'Bing' could not be found (are you missing a using directive or an assembly reference?)    c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchard project\e50c6120\bb09315c\App_Web_0m3hf3qk.0.cs    30   

so i thought i will uninstall the bing module. but it seems there is no such option, do i deleted the bing folder from module folder. but then other errors in other modules occur. so i  focus my questions:

  1. How to uninstall a module?
  2. How to build the project in vs2010?
  3. How to debug the project and find the code where it tries to send an email?
  4. How is it possible that the site runs when running it from webmatrix but not from vs2010?


Oct 23, 2012 at 8:24 PM
Edited Oct 23, 2012 at 8:25 PM

I don't profess to be an expert on Orchard, so feel free to correct any mistakes on my part:

If you are going to build / develop modules, etc., you need the Orchard source, not Orchard.Web.  Please look through the Orchard Documentation sections to get that going. Here is one link to get you started

1) To uninstall you can either disable it in the ~/Admin, or if you cannot get there because of a site error just delete the folder containing the module in your ~/Modules directory.  There is another way of "disabling" the module through the command prompt. I think you have to Ctrl-Shift-Right Click on the main Orchard folder and type bin/Orchard to get it to run. Again, that's probably off, so check the docs. You can then do something like "feature disable [Exact Name of Module as it appears in ~Modules/module.txt file].

2) See the link above to the docs. Again, you don't build Orchard.Web, you do that with the Orchard source.

3) That's beyond my ability to explain - I'd suggest going to the Visual Studio site or doing a Google search.

4) I don't think you could "Run" Orchard.Web from VS2010. You should be able to run the Orchard source from VS. Again, check the docs.

I hope that helps a bit.

Oct 24, 2012 at 10:19 AM
Edited Oct 24, 2012 at 10:20 AM

Thanks, i downloaded the files that you suggested and i could build it correctly.

Now I need to transfer my modules and all other settings I've done in the tutorial to the new project. How can I do that?

Oct 24, 2012 at 5:25 PM
Edited Oct 24, 2012 at 5:26 PM

These are really VS questions, so again a word of warning: I am no expert.

I think what you can do is this (roughly):

1) In Windows Explorer copy over the individual module's folder to the ~/Orchard.Web/Modules folder in the Orchard source folder you have.

2) In Visual Studio, right-click the Modules project folder and click Add > Existing Project, then search for the folder of the module you just copied over, open it and click on the .csproj file to open it up inside VS.

This should work - but I think it also would assume your individual Module's have a .csproj file in them. Otherwise, you might have to do some manual work (i.e., adding a new module project yourself - please search the docs on how to do that, if necessary).

Just a word of caution: Orchard is about to publish 1.6 which will make use of MVC 4. In any event, if you go the 1.6 route I think you might need VS 2012.

Oct 24, 2012 at 6:19 PM
Edited Oct 24, 2012 at 6:20 PM

I followed the route you suggested, deleted current modules folder, copied the folder from the other project, deleted some modules that for some reasons couldn't build and deleted the tests folder which also caused errors. Now i could build the project with my modules folder and without errors.

I used the wizard of the project to define a new project, and got the following error:

Exception Details: System.TimeoutException: Transaction Timeout

Source Error:

Line 89: 
Line 90:         public virtual T Get(Expression<Func<T, bool>> predicate) {
Line 91:             return Fetch(predicate).SingleOrDefault();
Line 92:         }
Line 93: 

Source File: C:\WebProjects\orchard\src\Orchard\Data\Repository.cs    Line: 91

I guess, i'm going to revert the replacement of the modules folder and the tests folder.

Oct 24, 2012 at 7:10 PM

Not sure what that means, to be honest. With respect to building modules (I am assuming you are creating new modules, not just modifying existing ones), take a look at the docs: Look under "Extending Orchard" with respect to module development. Sorry couldn't be much more help.

Oct 25, 2012 at 7:23 AM

This looks more like a database connectivity issue.

Oct 25, 2012 at 9:49 AM

I downloaded the modules using the dashboard, i just wanted to transfer all changes from the old project to the new. The database is sql compact, it's just a file so i don't think it's connectivity related issue.

Oct 25, 2012 at 11:36 AM

I searched the code for the keyword smtp and found the relevant code that sends the email. But I don't think it's the good way to do it. Is there any documentation explaining the code structure?

Oct 26, 2012 at 3:17 AM

There are too many different issues in this thread. Can you please summarize what you are trying to do, what you tried and how it doesn't work?

I think what you're looking for is MailActions, in Orchard.Email.

Oct 26, 2012 at 12:49 PM

summary of the issues and solutions until now:


  1. uninstalling a module - anwser: delete the module folder.
  2. build orchard project in vs - answer: impossible unless you use the source files and not the web site you opened with the webmatrix.
  3. find position in the code related to specific action or event in the site - answer: you have to scan the code manually and put breakpoints hopefully you found the right place.
  4. how is it possible the site runs in webmatrix but not in vs? - still no answer.
  5. transfering modules and data from one orchard site to another - answer:  impossible?
  6. Any Documentation of the code structure of the source code so you can start working with it and debug it - still no answer.
Oct 26, 2012 at 8:22 PM

3. I think the mini profiler module will give you that information.

4. The site would run fine in VS if you opened it as a web site and not as a web application. In both cases, the site does not run in the IDE, it runs on a development web server. But if you have VS, we recommend you use the full source code.

5. Of course it's possible. Just copy the module's folder, then use import/export to copy the data.


Oct 28, 2012 at 10:36 AM

Thanks for answering the remaining questions.

About 4. 

I can tell that i did open it as web site and i had the errors described above, when trying to build the project.

About 5.

I did copy the modules folder and it also  had the errors decribed above, I think it's also related to the fact that I tried to copy modules from the webmatrix site to vs. And I would like to clarify your answer that import/Export is a module you can download from the gallery and then you will have import/export option in the orchard menu.

Oct 29, 2012 at 7:48 PM

You do not need to build when running as a web site. There is no project to build. If you built the project, then you didn't open it as a web site but as a web application.

Nov 8, 2012 at 1:34 PM

Actually you can build a web site, you may deploy it even if you don't build it. But you it's better you build it first in order to see that no errors found.

I build web sites all the time.

Nov 8, 2012 at 9:22 PM

I'm sure you do. I said "if you built the project". I also said "you do not need", not "you can't".