Visual Studio 2015 Update 2 breaks EF reverse code engineer vsix

After you install the latest Visual Studio 2015 Update 2 environment update, the EF feedback code recovery program is disabled with the following error message.

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) 

I tried uninstalling and reinstalling the tool using the Julie Lermans link to get a fixed version of VS 2015 vsix installer.

Help!

+16
visual-studio-2015 entity-framework vsix
Apr 05 '16 at 8:45
source share
8 answers

New for VS2015: https://onedrive.live.com/?authkey=%21AP6uv8OLvM5qnmU&cid=FFD7F3DFCD5E1160&id=FFD7F3DFCD5E1160%2161967&parId=FFD7F3DFCD5E1160%2161965&action=locate

After Update 2: Right-click the project in Solution Explorer> Properties> Target Switch Structure back to 4.5.1, and then rebuild the solution. Now run the reverse engineering tool. I worked correctly on mine

+43
Apr 26 '16 at 11:16
source share

Setting up the project as a launch project helped me get around this error.

+4
Sep 04 '17 at 6:30
source share

I'm not sure that my case is 100% yours, but the error is the same and the precondition.

My initial "sin" was a file configured for CodeAnalysis, so the first step is: " Check the project properties on the Code Analysis tab, if you are using an existing file ."

Now the first Exception has disappeared, but a new, really unexpected OutOfMemoryException has appeared!

Taking the devenv.exe process under control, I noticed that it begins to quickly consume RAM (from 250 MB to 2 GB in less than 1 second!), For no scientific reason :-) I tried to create a new Empty Ruleset and linked him with the project, and he incredibly started working again!

Hope this helps you.

+3
Apr 20 '16 at 21:40
source share

It seems that the EF6 Power Tools needs love from someone. It is well documented that you need to change the .vsix zv package before installing it in VS2015.

It seems that this has significant stability issues. After many changes to the topic, doing the following forces the tool to repeat the problems ...

  1. start a new project. and set the target structure to 4.5.1
  2. add app.config
  3. Installation Package Essence -ProjectName MYPROJ
  4. [RIGHT-CLICK] [Entity Framework] [Engineer Reverse Code First (RECF)]
  5. Select both a connection and a database. This works with repeatability without a problem, and the output (RECF) works again and again at this point.

  6. [RIGHT CLICK] [Entity Framework] [Configuring reverse engineer templates] and adding .t files. Repeating step 4 RECF works repeatedly.

  7. Now change context.tt is very simple, for example, just adding a comment

back to top context.tt causes the RECF procedure of step 4 to fail sequentially. Restarting the VS2015 and reloading the block still prevents the 4-RECF step from working again.

Removing the project and restarting it seems to allow the RECF process to work, BUT as soon as I import tt and then make changes to .tt, then there is a spiral of various problems in the output ...

or

Not enough memory to continue running the program #

OR

An exception occurred while trying to compile the conversion code.

OR

One or more errors occurred while processing the Entity.tt template. error: An exception occurred while trying to compile the conversion code. The following exception was thrown: System.ArgumentException: An empty path name is not valid.

On this resource
https://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d , there are people commenting on various similar problems, but in general I am unstable, unreliable and difficult to use this tool in a stable, repeatable form.

+1
Oct 30 '16 at 19:38
source share

Change your .Net Framework to 4.5, right-click on Project> Properties> Target Framework. Now try the 'Reverse CodeFirst Engineer'.

+1
Sep 27 '18 at 9:19
source share

The problem is that the tool does not automatically download the Entity Framework package , which violates the rules in the standard set of code analysis rules. Therefore, the workaround first is to manually install the Entity Framework package , and then run the reverse engineer code generator.

0
Apr 21 '16 at 8:22
source share

For me, it was as simple as another restart of the visual studio.

0
Jul 12 '18 at 11:37
source share

In my case, I updated the entity structure from 4.5 to 4.6, 4.5.1 did not work. Follow these steps to fix this problem.

Right-click the project in Solution Explorer> Properties> Target platform, switch from 4.5 to 4.6 and rebuild the solution.

0
Jan 27 '19 at 14:28
source share



All Articles