Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Error message: One or more compilation references are missing. Ensure that your project is referencing

29.06.2018 (๐Ÿ‘9584)

 

Error message: One or more compilation references are missing. Ensure that your project is referencing 'Microsoft.NET.Sdk.Web' and the 'PreserveCompilationContext' property is not set to false

 

Concerns Asp.Net Core MVC

 

The error message appears on Asp.Net Core MVC Views.

 

 

Reason:

If you have renamed a model class in the Asp.Net Core MVC Project, then the entries are only changed in the code files.

The view files .cshtml are not customized.

You then have to rename the connected data model in the header of the view file

Like here:

@model Notes_Index_View_DataModel

 

Zu

@model Projects_Index_View_DataModel

 

 

 

 

Complete error message

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

Generated Code

One or more compilation references are missing. Ensure that your project is referencing 'Microsoft.NET.Sdk.Web' and the 'PreserveCompilationContext' property is not set to false.

 

ยท        The type or namespace name 'Notes_Index_View_DataModel' could not be found (are you missing a using directive or an assembly reference?)

34. #line hidden

35. #line 5 "D:\Programmierung\Web\Freelance\Freelance\Freelance\Views\_ViewImports.cshtml"

36. using Freelance.Models.ManageViewModels;

37.  

38. #line default

39. #line hidden

40.     public class _Views_Projects_index_all_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<Notes_Index_View_DataModel>

41.     {

42.         private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("src", new global::Microsoft.AspNetCore.Html.HtmlString("~/js/projects_list_2018-05-28.js"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);

43.         private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("rel", new global::Microsoft.AspNetCore.Html.HtmlString("stylesheet"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);

44.         private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/css/projects_list_2018-04-25.css"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);

45.         private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("title", new global::Microsoft.AspNetCore.Html.HtmlString("Show User Notes"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);

46.         private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("style", new global::Microsoft.AspNetCore.Html.HtmlString("text-decoration:none;width:100%;height:100%"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);

ยท        The type or namespace name 'Notes_Index_View_DataModel' could not be found (are you missing a using directive or an assembly reference?)

366.           public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }

367.           [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]

368.           public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }

369.           [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]

370.           public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }

371.           [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]

372.           public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<Notes_Index_View_DataModel> Html { get; private set; }

373.       }

374.   }

375.   #pragma warning restore 1591

376.