codesmithtools / Templates

CodeSmith Generator Templates
http://www.codesmithtools.com/product/generator
54 stars 35 forks source link

dbsnapshot fails with no error code/results #721

Closed cyberjetx closed 1 year ago

cyberjetx commented 1 year ago

re: ( https://github.com/codesmithtools/Templates/tree/master/Templates/Database/DbSnapshot )

Running against an existing Azure MSSQL database that I run other templates against dbsnapshot simply fails. Also, ran against petshop sample to see if it was an Azure issue, however it fails the same way.

Environment is windows 10 running in parallels

image

image

niemyjski commented 1 year ago

What's the error you are running into?

cyberjetx commented 1 year ago

It just says generation failed and the error screen is empty as in the image. The usual suspects are covered there are PKs on every table and data in all tables. There are no alterations to the code. No crash or popup messages from the tool either.

To try and remove the Mac weirdness that happens sometimes I ran this on my non-parallels machine and I at least get a message in the error screen:

output directory set to - C:\temp\Database\DbSnapshot\

---------------- Generation started -----------------
Error: The given path's format is not supported.
Stack Trace:
   at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at _CodeSmith.DbSnapshot_cst.Render(TextWriter writer) in C:\Source\CodeSmith\85Templates\Samples\v8.5\Templates\Database\DbSnapshot\DbSnapshot.cst:line 63
   at CodeSmith.Engine.CodeTemplate.RenderToString()
   at CodeSmith.Engine.Remoting.TemplateSession.QmMAfSTgop()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Build complete -- 1 errors, 0 warnings

---------------------- Done ----------------------

Generation failed

hth

does it run for you?

niemyjski commented 1 year ago

Hello,

It’s saying you don’t have permission to create that folder. I’d double check that folder exists and has the same user permissions.

cyberjetx commented 1 year ago

I have discovered the real issue and have cloned and fixed the issue. I tried to push a feature branch to create a pull request but access denied which make sense. of course. May I have temp permission to do it?

niemyjski commented 1 year ago

Awesome! If you click the fork button in upper right you can make changes in your own repo and then one button click a pull request.

cyberjetx commented 1 year ago

Done. CLA signed as well. I realized I've been using codesmith for at least 15 years. Glad to contribute again. :)

cyberjetx commented 1 year ago

722 Changes understood and committed. :)

niemyjski commented 1 year ago

Thanks!