MVC error encounted - c#

I'm developing an application using MVC 5 when I run it I got this 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: CS0246: The type or namespace name 'template'
could not be found (are you missing a using directive or an assembly
reference?)
Source Error:
Line 28:
Line 29:
Line 30: public class _Page_Views_Emergence_Index_cshtml : System.Web.Mvc.WebViewPage<IEnumerable<template.model.emergenceview>> {
Line 31:
Line 32: #line hidden
Source File: d:\local\Temporary ASP.NET
Files\root\9c72e46c\a2166d6c\App_Web_index.cshtml.4574e8d.-zs3j30-.0.cs
Line: 30

This error clearly indicates that you model IEnumerable<template.model.emergenceview> cannot be resolved because template namespace cannot be found. Make sure that namespace is correct(it is case-sensitive) and it wasn't renamed/removed.

Related

The type or namespace name searchDataContext could not be found are you missing a using directive or an assembly reference

I am working with .dbml file. file name search.dbml on local computer working file but when I upload it giving me 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: CS0246: The type or namespace name 'searchDataContext' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 17: public partial class approducts : System.Web.UI.Page
Line 18: {
Line 19: searchDataContext objProduct = new searchDataContext();
Line 20: protected void Page_Load(object sender, EventArgs e)
Line 21: {

Moving EntityModel from root directory to model folder result in errors

I created entityframework on root directory, after moving it to model directory I get this error:
CS0234: The type or namespace name 'Employee' does not exist in the
namespace 'Melsco2016' (are you missing an assembly reference?)
Line 27:
Line 28:
Line 29: public class _Page_Views_Home_Index_cshtml : System.Web.Mvc.WebViewPage<IEnumerable<Melsco2016.Employee>> {
Line 30:
Line 31: #line hidden
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\root\6c3c13cf\e07d3222\App_Web_index.cshtml.a8d08dba.3vqwrhbc.0.cs
Line: 29
Your namespace has been changed.It would be now Melsco2016.Models
Try using Melsco2016.Models.Employee

Dynamics CRM xrm.cs compile error

I'm trying to connect to CRM using steps declared in this link
https://msdn.microsoft.com/en-us/library/gg695790.aspx
Error
Server Error in '/' Application.
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: CS0012: The type 'System.Data.Services.IUpdatable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 192816: /// </summary>
Line 192817: [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "7.0.0000.3543")]
Line 192818: public partial class XrmServiceContextr : Microsoft.Xrm.Client.CrmOrganizationServiceContext
Line 192819: {
Line 192820:
Source File: c:\Users\Gevor\Documents\Visual Studio 2013\Projects\TestCRM\TestCRM\App_Code\Xrm.cs Line: 192818
Command line parameters
c:\DynamicsCRM\SDK\Bin>CrmSvcUtil.exe /out:Xrm.cs
/url:https://Organization/XRMServices/2011/Organization.svc
/domain:DOMAIN /username:USERNAME /password:PASSWORD /namespace:Xrm
/serviceContextName:XrmServiceContextr
/codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,
Microsoft.Xrm.Client.CodeGeneration"
If System.Data.Services is not the GAC, it neeeds to be merged in your assembly, not only referenced.
You need to add a System.Data.Services reference to your TestCRM application.

How to resolve NopCommerce Error?

In Product display page showing proper image but when I click any product Image it is throw bellow error.
Server Error in '/' Application.
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: CS1061:
'System.Web.Mvc.HtmlHelper'
does not contain a definition for 'GenerateCaptcha' and no extension
method 'GenerateCaptcha' accepting a first argument of type
'System.Web.Mvc.HtmlHelper'
could be found (are you missing a using directive or an assembly
reference?)
Source Error:
Line 47: {
Line 48: <div class="captcha-box">
Line 49: #Html.Raw(Html.GenerateCaptcha())
Line 50: </div>
Line 51: }
Source File: h:\root\home\raaisoma-001\www\site1\Plugins\SevenSpikes.Nop.Plugins.NopQuickTabs\Views\ProductTab\_ProductReviews.cshtml Line: 49
But When I click on QuickView product display properly.
You're missing appropaite namespace. Add
using Nop.Web.Framework.UI.Captcha;
to this file

error while uploading an ASP site - cant access class

i've uploaded my ASP.NET site to an hosting server.
while i used the visual studio compailer - there were no errors.
now i get the following error when the code tries to access the class:
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: CS0246: The type or namespace name 'vSQL' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 32:
Line 33: string checkActivity = "SELECT Count(*) FROM activity WHERE activityCode=" + activityID.Text + ";";
Line 34: vSQL checkSqlActivitys = new vSQL();
Line 35: DataSet ds = new DataSet();
Line 36: ds = checkSqlActivitys.sqlRet(x, checkActivity);
what do i need to change/add?

Categories