Question

I have the following DB Model enter image description here

At home I work with Visual Studio and SQL-Server on my PC. Now I took the PC at work and tried to create an EFModel using a SQL-Server in our network. Creating the Model at work I get 44 Errors. First curious thing (for me) is i get a msgbox with "Running this text template can potentially harm your computer.Do not run it , if u obtained it from an untrusted source..." i confirmed with ok (two times for 2 pop ups). Afterwards I see 44 Errors. After a few minutes I get the same msgbox as above again. After pressing OK a few errors are deleted (now I have 32 Errors).

Since I have the german express version I try to translate the remaining errors by structure:

  • "Public Property WindesName as String" has many definitions with identical signatures.
  • variable "_WindowsName" creates a conflict with a property "WindowsName" that is an implicitly declared member of class "Name"

I have this kind of errors for every field.

What I tried: I actually wanted to create the Model into a program, that doesnt work. Then i used a blank application, doesent work too. I reinstalled EF from nuget with no effect.

Maybe it has something to do with the model or with the network. Any help is welcome.

Was it helpful?

Solution

Ok, I was able to fix it. I changed Code Generation Strategy to Standard, deleted the two .tt files and rebuild the project. Now it is working.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top