1

Am using Microsoft Visual Studio Tools for Applications 2015, I have installed EF Power Tools as in Installing EF Power Tools into VS2015

After that I was trying to run EF Reverse engineering code first approach, but I was getting the issue and resolved from Visual Studio 2015 Update 2 breaks EF reverse code engineer vsix

When I have done this I am getting an issues now as One or more errors occurred while processing template 'Entity.tt'. For this I have followed One or more errors occurred while processing template ‘Entity.tt’. And I have even added

Trusted_Connection=False;Persist Security Info=True

In web.config and changed Persist Security Info=True in advanced tab, but still the issues isn't resolved am getting the same issue as in title.

Need help/suggestions.

Detiled error from visual studio output window.

One or more errors occurred while processing template 'Entity.tt'.
error : An exception was thrown while trying to compile the transformation code. The following Exception was thrown:
System.ArgumentException: Empty path name is not legal.
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(String path)
   at Roslyn.Utilities.FileUtilities.OpenFileStream(String path)
   at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
   at Microsoft.VisualStudio.TextTemplating.CompilerBridge.<>c.<.ctor>b__15_0(String x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.<UnionIterator>d__66`1.MoveNext()
   at System.Linq.Enumerable.<UnionIterator>d__66`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at Microsoft.CodeAnalysis.ImmutableArrayExtensions.AsImmutableOrEmpty[T](IEnumerable`1 items)
   at Microsoft.CodeAnalysis.Compilation.ValidateReferences[T](IEnumerable`1 references)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.WithReferences(IEnumerable`1 references)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CommonWithReferences(IEnumerable`1 newReferences)
   at Microsoft.VisualStudio.TextTemplating.CompilerBridge.PrepareNewCompilation()
   at Microsoft.VisualStudio.TextTemplating.CompilerBridge.Compile()
   at Microsoft.VisualStudio.TextTemplating.TransformationRunner.Compile(String source, String inputFile, IEnumerable`1 references, Boolean debug, SupportedLanguage language, String compilerOptions)

Need help/suggestions

magicandre1981
  • 27,895
  • 5
  • 86
  • 127
Sultan
  • 133
  • 3
  • 21
  • 1
    use [Entity Framework 6 Power Tools Community Edition](https://marketplace.visualstudio.com/items?itemName=ErikEJ.EntityFramework6PowerToolsCommunityEdition) the old one is deprecated now and no longer updated. if you still have issues, create a new issue [here](https://github.com/ErikEJ/EntityFramework6PowerTools/issues) – magicandre1981 Nov 14 '17 at 16:13

1 Answers1

2

My workaround for this is the following:

  1. Right click on the project, open Properties.
  2. Change the Target Framework to .NET Framework 4
  3. Rerun the Reverse Engineer Code First script.
  4. Reopen project properties, change Target Framework back to what you want it to be
Eric North
  • 21
  • 7