-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recommendations for publishing the application #106
Comments
It is recommended to publish the application in a directory other than the project folder (where the project file is located). Example: dotnet publish -o /home/admin/out/PublishedApp -c Release Why should you follow this recommendation?The library may fail intentionally through a developer error. For example, imagine that the project structure of a developer is: └── ConsoleApp/
├── Reports/
│ ├── products.sql
│ └── orders.sql
├── ConsoleApp.csproj
└── Program.cs A developer can execute the following command: dotnet publish -o MyOutput -c Release A directory called MyOutput is created in /ConsoleApp and this directory will have a yesql folder with the SQL files. └── ConsoleApp/
├── bin/Release/net8.0/
│ └── yesql/
│ └── Reports/
│ ├── products.sql
│ └── orders.sql
├── Reports/
│ ├── products.sql
│ └── orders.sql
├── MyOutput/
│ ├── yesql/
│ │ └── Reports/
│ │ ├── products.sql
│ │ └── orders.sql
│ ├── ConsoleApp.dll
│ ├── ConsoleApp.exe
│ └── ConsoleApp.pdb
├── ConsoleApp.csproj
└── Program.cs When the developer executes the └── ConsoleApp/
├── bin/Release/net8.0/
│ └── yesql/
│ ├── Reports/
│ │ ├── products.sql
│ │ └── orders.sql
│ └── MyOutput/
│ └── yesql/
│ └── Reports/
│ ├── products.sql
│ └── orders.sql
├── Reports/
│ ├── products.sql
│ └── orders.sql
├── MyOutput/
│ ├── yesql/
│ │ └── Reports/
│ │ ├── products.sql
│ │ └── orders.sql
│ ├── ConsoleApp.dll
│ ├── ConsoleApp.exe
│ └── ConsoleApp.pdb
├── ConsoleApp.csproj
└── Program.cs This is normal behavior, it cannot be avoided, however, this causes the library to load the same SQL files, so it leads to an exception for having duplicate tags. This exception occurs when using this method: YeSqlLoader.LoadFromDefaultDirectory (this loads the SQL statements from a default directory called The one that is recommended is not to create the publish directory inside the project folder, after all git would track the changes and it should not be like that. |
No description provided.
The text was updated successfully, but these errors were encountered: