vb.net - Remove a duplicate Context.vb files from Entity Framework -


I have a problem with the EF6 in VS2013. I have a web application project in the database-string connection for the first model Had to modify, so I followed the advice in the best answer and gave it my web Removed from the config file. Firstly it seemed to work fine, I removed the connection string from the unit designer, I ran the "update model from database", the connection string was created again, but then failed with many errors similar to my build: <

After some digging, I came to know that when I reconfigured the connection string, then there are several definitions with the same signature in the public sub-new () Another model Created. Model vb file Model.Context1.vb and both are still referenced somewhere. Since then, I have opened every file in the folder in which reference to my EF model in the context of Notepad. Vb Or kantex 1 It has been discovered in the context of VB and it is empty, if I delete the file, then my creation can fail to tell the file, so as an alternative solution I opened the Context.vb file and all the code Removed so that there is no duplicate, I want to fix the file by correcting it to fix it properly if someone knows how I can go about doing this.

After attempting to restore the old version of EF files from source control, it was resolved and now Also in the same issue, I realized that the reference was probably in a project file.

In [projectName] Vbproj I found these two entries:

  & lt; Include Compilation = "Data \ Scheduler Model.Estitution 1.vb" & gt; & Lt; Autogen & gt; This is true & lt; / Autogen & gt; & Lt; DesignTime & gt; This is true & lt; / DesignTime & gt; & Lt; DependentUpon & gt; SchedulerModel.Context.tt & lt; / DependentUpon & gt; & Lt; / Compiled & gt; & Lt; Include content = "data \ schedulemodel.domain.tt" & gt; & Lt; Generator & gt; TextTemplatingFileGenerator & lt; / Generator & gt; & Lt; DependentUpon & gt; SchedulerModel.edmx & lt; / DependentUpon & gt; & Lt; LastGenOutput & gt; SchedulerModel.Context1.vb & lt; / LastGenOutput & gt; & Lt; / Content & gt; I removed for the first time, and in the second removed 1 from the context.vb file, opened the project and ran the race to rebuild without problems.   

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -