0
votes

I am currently having an issue with dependencies between modules in Orchard. If I just set the reference in the module it works fine, but once I try to make a method call to the other module I get this error:

Orchard.Environment.DefaultBuildManager - (null) - Error when compiling assembly under ~/Modules/ExampleProject.Reservations/ExampleProject.Reservations.csproj. System.Web.HttpCompileException (0x80004005): f:\ExampleProject\Example Company\src\Orchard.Web\Modules\ExampleProject.Reservations\ViewModels\ReservationViewModel.cs(19): error CS0433: The type 'ExampleProject.Utils.Attributes.OrchardLocalizedDisplayName' exists in both 'c:\Users\Sammi\AppData\Local\Temp\Temporary ASP.NET Files\orchardlocal\fa2342db\ec2b909e\App_Web_0db0qcdx.dll' and 'f:\ExampleProject\Example Company\src\Orchard.Web\App_Data\Dependencies\ExampleProject.Utils.dll' at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath) at Orchard.Environment.DefaultBuildManager.GetCompiledAssembly(String virtualPath) in f:\ExampleProject\Example Company\src\Orchard\Environment\IBuildManager.cs:line 53

I've tried removing the dependencies folder, cleaning and rebuilding the solution and it still doesn't seem to work. I've also tried setting dynamic module compilation to false.

Any ideas here?

Thanks in advance.

1
My guess would be that you referenced the dll instead of referencing the project.Bertrand Le Roy
I'm referencing the project.The Pax Bisonica
Delete your temporary asp.net files and try again.Bertrand Le Roy
Just tried that, still doesn't work.The Pax Bisonica
Where are you making the method call from?Bertrand Le Roy

1 Answers

0
votes

I ended up creating a new module through command line and moving all of the code from the old one in there. The module I had was renamed from an older one, so not sure if that had something to do with it.