Creation of new addon

Vote:
 

Hi All,

I am trying to create a new addon, so i have created couple of controllers and some views related to them and packaged everything.

Now i am not able to access them post packaging i.e nuget package which is under modules , protected folder. I am able to trigger the controller but the view is giving compilation error , but if i copy them out of the package it is working as expected.

ProjectRoot
  Controllers
    SourcesController.cs
  modules
    _protected
      MyProjectName
        Views
          Sources
            Index.cshtml

How i should call my index.cshtml from the controller to get it detected.

I added the compilation node with the assembly name in system.web config. Still it didnt work out.

Error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name 'model' does not exist in the current context

Source Error:


Line 49: BeginContext("~/epi/ProjectRoot/Views/Sources/Index.cshtml", 193, 5, false);
Line 50: 
Line 51: Write(model);
Line 52: 
Line 53: EndContext("~/epi/ProjectRoot/Views/Sources/Index.cshtml", 193, 5, false);



Can anyone suggest the best possible to way implement a add-on(I am not looking for admin pages or plugins).


Regards,
Manik

#218364
Edited, Mar 11, 2020 18:02
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.