An error occurred while starting the selected code generator: "The reference to the object is not installed in the instance of the object." Error?

enter image description here

I tried all solutions, such as VS 2013 repair, but to no avail. When you create a controller by right-clicking on the Controller folder and adding a controller, then you right-click in the Action of the newly created controller and select Add View, this happens exactly when I try to create a view. This is not a new project, this is an existing project.

+10
source share
16 answers

VS2017, , :
C:\Users\username\AppData\Local\Microsoft\VisualStudio\15.0_7fca0c70 ComponentModelCache _ComponentModelCache - , Visual Studio .
VisualStudio 15.0_7fca0c70 , VS. . , - .

+3

, , .NET Core , DbContext.

- , , - .NET

+2

Visual Studio 2017, :

1 - - , ( Nugget ..) ( MySql db, MySql MySql, Data, EntityFramWorkCore)

2 - Visual Studio Visual Studio ( Visual Studio ( - , ""))

, ,

+2

Entity. ...

  • Entity Framework.
  • .
  • ... .
+1

, , -

+1

.vs .

+1

, , , , " " . . , .

.

0

, , , - .

0

ConnectionString Web.Config

<add name="xxx" connectionString="Data Source=xxx;initial catalog=xxx;Persist Security Info=True;User ID=xxxx;Password=xxxx;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />

<add name="xxx" connectionString="metadata=res://*/EFMOdel.csdl|res://*/EFMOdel.ssdl|res://*/EFMOdel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=xxxx;initial catalog=xxxx;persist security info=True;user id=xxxx;password=xxx;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
0

vs2017 windows10, , vs , , .

0

. Visual Studio , .

0

:

  • Visual Studio
  • Visual Studio

:

  • (Microsoft.VisualStudio.Web.CodeGeneration.Design) .

: Visual Studio 2019 - Razor Pages -.Net Code 2.2 - Windows 10

0

, , , , . :

  • .Net Web App, , solution-, .
  • , Add Controller. .

, . , - !

0

DefaultController, .

0

Visual Studio .

-3

Source: https://habr.com/ru/post/1652357/


All Articles