Skip to content
Advertisement

Getting wrong file path when generating file route in C# Console App

Hi im trying to read in a sql script in a C# console app. Sorry if this is super basic but im having issues as the file route that its generating always starts ion the bin folder of the project.

The error im recieving is as follows:

Something went wrong try configuring the release again. System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. :

‘C:Zupa_Source_CodeZupa.ReleaseDeploymentAutoConfigureZupa.ReleaseDeploymentAutoConfigurebinDebugnetcoreapp3.1file:C:Zupa_Source_CodeZupa.ReleaseDeploymentAutoConfigureZupa.ReleaseDeploymentAutoConfigureSqlScriptsAddApiResorces.sql’

The correct path is being added to the end of the bin directory which is

file:C:Zupa_Source_CodeZupa.ReleaseDeploymentAutoConfigureZupa.ReleaseDeploymentAutoConfigureSqlScriptsAddApiResorces.sql

Thanks in advance, Chris.

Advertisement

Answer

Change “CodeBase” in this line

to be Location:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement