Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Unable to open diagram editor in VS2019 (new .csproj format) #66

Closed
ksamuelsen opened this issue Apr 16, 2019 · 23 comments
Closed

Unable to open diagram editor in VS2019 (new .csproj format) #66

ksamuelsen opened this issue Apr 16, 2019 · 23 comments
Labels
Visual Studio issue Problem is in VS and has been reported. workaround available There's a problem that needs fixed, but a procedure can currently be used to get the same result

Comments

@ksamuelsen
Copy link

ksamuelsen commented Apr 16, 2019

I cannot get the editor to work on VS 2019, I just get the following error.
EFDesigner_Error

I downloaded the latest VSIX from the 2019 branch (dated 4/15/2019, version 1.2.6.25, using Visual Studio Community 2019 - version 16.0.1. It works fine in Visual Studio 2017.

I also downloaded the source, but I'm getting a bunch of errors (same in VS2017 and VS2019). When I open the project, VS does a migration which leads me to believe this was compiled on an earlier version. Even if I manage to get past those, I get a whole new set of runtime errors (NullReferenceException for the most part), so there must be something in the source code that is not up to date.

The source code errors I get with a filename variable in DSL SerialHelper.cs (the variable is used in a method call, but not declared anywhere), then I get errors from the T4 generated code - it seems to add whitespace/newline before the XML declaration for some of the XML files (which the XML parser does not accept).

Edit: I found the document on the bug in SerialHelper.tt. Still having problems getting this to work on VS2019 though.

@msawczyn
Copy link
Owner

1.2.7 pre-release is in the releases and takes care of many of the VS2019 issues. However, it doesn't fix the issue that the Modeling SDK (which this tool is based on) has with .NET Core and .NET Standard projects -- the one where it complains about the DynamicTypeBrowseObject. You can, however, install 1.2.7 in VS 2017 and it runs fine with all project types.

I'm working to see if I can work around the problems but, if not, it'll be up to the Modeling SDK folks to get this working again.

@msawczyn msawczyn added the bug Confirmed bug label Apr 16, 2019
@msawczyn msawczyn added the help wanted Looking for help resolving this issue label Apr 17, 2019
@msawczyn msawczyn changed the title Unable to open diagram editor in VS2019 Unable to open diagram editor in VS2019 (new .csproj format) Apr 18, 2019
@mmarinchenko
Copy link

I have started to experience a problem with Modeling SDK on VS2017 recently :( The error message looks like this:

An Exception was thrown while trying to get the namespace imports and assembly references for processing the run from a directive processor named 'EFModelDirectiveProcessor'. The transformation will not be run. The following Exception was thrown: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TextTemplating.Modeling.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'Microsoft.VisualStudio.TextTemplating.Modeling.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Sawczyn.EFDesigner.EFModel.EFModelDirectiveProcessorBase.GetReferencesForProcessingRun() at Microsoft.VisualStudio.TextTemplating.Engine.ProcessDirectives(List 1 blocks, ITextTemplatingEngineHost host, TemplateProcessingSession session, CodeAttributeDeclarationCollection& templateClassCustomAttributes).

@mmarinchenko
Copy link

After I explicitly installed Modeling SDK in VS2017 the error is dissapear. So it seems the recent version of EFDesigner actually requires Modeling SDK to function properly :)

P.S. I also noticed on VS2019 there is no "EFDesigner" item under "Data" section in "Add New Item" dialog (Class Library project with NET Core 2.1 SDK).

@msawczyn
Copy link
Owner

Can you please check if Microsoft.VisualStudio.TextTemplating.Modeling.15.0.dll is in the installation directory for the extension? It should be -- it's flagged as Copy Local in the build, and is tagged to be included in the VSIX.

Thanks.

@mmarinchenko
Copy link

I checked and it's not.

Also I checked this earlier when I was looking for the cause of the problem. Microsoft.VisualStudio.TextTemplating.Modeling.15.0.dll was not in the system at all.

Next I downloaded VSIX file from here (release 1.2.7.1) and decompressed it using 7zip. I found there Microsoft.VisualStudio.Modeling.Sdk.15.0.dll, Microsoft.VisualStudio.Modeling.Sdk.Diagrams.15.0.dll, and Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0.dll. But not Microsoft.VisualStudio.TextTemplating.Modeling.15.0.dll.

Now (after I installed the SDK) Microsoft.VisualStudio.TextTemplating.Modeling.15.0.dll is located in 2 places:

  • C:\Users\<user>\AppData\Local\assembly\dl3\QBKB6MOO.CVT\K01M10GR.WHO\d4cc18b2\161dfd49_b8fad401
  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies

@msawczyn
Copy link
Owner

I'm going to have to dig into this. I have a computer that's never had the SDK installed, and the extension is working quite well there. My teammates' computers work as well (without the SDK). Curiouser and curiouser.

@mmarinchenko
Copy link

It's strange. Anyway, everything is working now, so I don’t find it critical :)

@npagare
Copy link

npagare commented Jun 20, 2019

Hi @msawczyn , thank you so much for this extension.
While the VS 2019 team addresses the open issue, can I open existing (VS2019) project having sqlite3 file in VS 2017 and use your extension there ? I am a bit skeptical if that will corrupt any of the project format which may not be compatible between 2019 and 2017.

Would you appreciate your thoughts?

Thanks,

@msawczyn msawczyn added the workaround available There's a problem that needs fixed, but a procedure can currently be used to get the same result label Jun 26, 2019
@michaelpear
Copy link

I downloaded VS 2019 V16.2 Preview 3 where this problem was listed as fixed. Confirming that the designer opens and works as expected.

@msawczyn
Copy link
Owner

msawczyn commented Jul 9, 2019

@michaelpear - Thanks for the confirmation! I haven't been able to afford the time or space for a side-by-side multi-gig installation (since I have two of them already :-) ).

@msawczyn
Copy link
Owner

msawczyn commented Jul 9, 2019

@IoTFier - there's no difference between the VS2017 and VS2019 .efmodel formats, so feel free to swap the files between compilers to your heart's content.

@msawczyn msawczyn added pending release Issue is resolved in the current codebase, will be published with the next release and removed bug Confirmed bug help wanted Looking for help resolving this issue labels Jul 9, 2019
@rlarik
Copy link

rlarik commented Jul 24, 2019

I can't seem to be able to draw association or inheritance lines between entities anymore with 2019 16.2 v4.

@msawczyn
Copy link
Owner

I'll see if I can get the preview installed somewhere and have a look.

@msawczyn
Copy link
Owner

msawczyn commented Jul 24, 2019

@rlarik - I've confirmed your observation above. I'll run it through the debugger later today and, if the problem is deep, have to put in another issue with the IDE team. I'm taking the 'fixed' tag off this.

The inability to draw lines between entities extends to the old-style project types as well. Seems the initial problem is fixed, but overall it's broken worse now.

@msawczyn msawczyn removed the pending release Issue is resolved in the current codebase, will be published with the next release label Jul 24, 2019
@npagare
Copy link

npagare commented Jul 25, 2019

@msawczyn , @rlarik - VS 16.2 stable is released today.

@msawczyn
Copy link
Owner

@IoTFier That's unfortunate. The connector problem is there in 16.2. Updating to that version will break the modeling tool.

@npagare
Copy link

npagare commented Jul 25, 2019

@msawczyn - what's our way out now ? I have been so eagerly waiting .....

@msawczyn
Copy link
Owner

msawczyn commented Jul 25, 2019

@IoTFier - looks like we're going to have to wait for Microsoft to get a fix in. It's in triage, and I'm guessing this one will get attention fairly quickly.

As well, I'm going to see if I can determine exactly why this is happening and see if I can't put in a workaround. It smells like a drag/drop problem so, depending on where the problem is, I may or may not be able to do anything about it as the extension level.

@npagare
Copy link

npagare commented Jul 26, 2019

@msawczyn - my deepest thanks for your help and support to all of us.

@npagare
Copy link

npagare commented Jul 30, 2019

@msawczyn - this is working in the latest VS 16.2 update.

I could even drag my code on the .efmodel palette and see the class diagram / ER relations
Reference to my closed issue #81

@msawczyn msawczyn added the Visual Studio issue Problem is in VS and has been reported. label Aug 7, 2019
@msawczyn
Copy link
Owner

@IoTFier - are you able to draw associations between entities in any 16.2.x version of Visual Studio? I just tried 16.2.2 and still no go. Although the same compiled extension works fine in 16.1.x and earlier.

@npagare
Copy link

npagare commented Sep 3, 2019

@msawczyn - I can't draw association between newly dropped entities. But it does show those associations for entities that are created from existing POCO. I am trying db first approach.

I am really sorry for not getting my response in time.

@msawczyn
Copy link
Owner

Closing since this has been fixed in Visual Studio 2019 v16.2.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Visual Studio issue Problem is in VS and has been reported. workaround available There's a problem that needs fixed, but a procedure can currently be used to get the same result
Projects
None yet
Development

No branches or pull requests

6 participants