MrJD
MrJD

Reputation: 1889

Orchard module doesn't work when built with VS2012

I've made a hello world module for orchard following this tutorial http://docs.orchardproject.net/Documentation/Building-a-hello-world-module

I've opened up the csproj in VS2012 and changed the projecttype guids to be MVC https://stackoverflow.com/a/12811015/828859

When I build the module in MVC orchard uses the published DLL. When i attempt to go to the /helloworld route i get 404 resource cannot be found

When i save a file and let the dynamic compilation in orchard do it's thing it works fine.

I would like to be able to deploy with a DLL so does anyone have any ideas on the problem?

Upvotes: 2

Views: 795

Answers (1)

Piotr Szmyd
Piotr Szmyd

Reputation: 13366

Ok, two things.

First - you won't be able to deploy your module as a single DLL. There are lots of things that do not get compiled into the DLL, eg. the Module.txt manifest. It has to be there under /Modules/<YourModuleName> (as well as module's .csproj file, .cshtml files and some more). Otherwise, Orchard won't be able to find your module.

So the source code for the module has to be there, although if you build it and the module's DLL is in /Modules/<YourModuleName>/bin folder, dynamic compilation won't kick in.

Second - module development should be done using full source code - not with the downloaded deployment package. Please read here how to get full source code.

Upvotes: 1

Related Questions