EF Core Power Tool for VS 2019 cannot add dbcontext diagram
See original GitHub issueThe tool threw exceptions when I attempted to add a dbcontext diagram in Visual Studio 2019 16.4.1 for EF Core 2.2.
Exception message: ` System.NotSupportedException: The given path’s format is not supported. at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath) 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, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter…ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) at System.IO.File.WriteAllText(String path, String contents, Encoding encoding) at EFCorePowerTools.Handlers.ModelAnalyzerHandler.GenerateDgml(String processResult, Project project) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ModelAnalyzerHandler.cs:line 122 at EFCorePowerTools.Handlers.ModelAnalyzerHandler.Generate(String outputPath, Project project, GenerationType generationType) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ModelAnalyzerHandler.cs:line 80
`
Steps to reproduce
- In VS 2019, right-click on the project that contains the dbcontext
- Select EF Core Power Tools
- Select Add DbContext Model Diagram
Further technical details
EF Core Power Tools version: 2.3.92.0
Database engine: MS SQL Server
Visual Studio version: Visual Studio 2019 16.4.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:27 (13 by maintainers)
Top GitHub Comments
I have attempted a fix in the latest daily build
So yeah this is the complete string used for the
Path.Combine
method:I guess that’s not going to work at all 😉
This is the value of the
modelResult
argument: