Hello,
I am configuring aspnetzero project on Azure DevOps CI/CD Pipelines
I am tring to run the Migrator.exe file but I am getting this error:
2020-12-28T15:21:29.2264374Z ##[section]Starting: Migrator
2020-12-28T15:21:29.2443195Z ==============================================================================
2020-12-28T15:21:29.2443556Z Task : Command Line
2020-12-28T15:21:29.2443800Z Description : Run a command line with arguments
2020-12-28T15:21:29.2444035Z Version : 1.1.3
2020-12-28T15:21:29.2444267Z Author : Microsoft Corporation
2020-12-28T15:21:29.2444595Z Help : More Information
2020-12-28T15:21:29.2444952Z ==============================================================================
2020-12-28T15:21:29.2526635Z ##[command]path\myCI\migrator\my.Migrator.exe -s
2020-12-28T15:21:33.8986190Z Unhandled exception. System.IO.FileNotFoundException: Could not find file 'path\log4net.config'.
2020-12-28T15:21:33.8986844Z File name: 'pathlog4net.config'
2020-12-28T15:21:33.8987187Z at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
2020-12-28T15:21:33.8988077Z at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
2020-12-28T15:21:33.8988552Z at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
2020-12-28T15:21:33.8989267Z at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
2020-12-28T15:21:33.8989604Z at System.IO.File.OpenRead(String path)
2020-12-28T15:21:33.8989903Z at Abp.Castle.Logging.Log4Net.Log4NetLoggerFactory..ctor(String configFileName)
2020-12-28T15:21:33.8990193Z at lambda_method1(Closure , Object[] )
2020-12-28T15:21:33.8990525Z at Castle.Core.Internal.ReflectionUtil.Instantiate(ConstructorInfo ctor, Object[] ctorArgs)
2020-12-28T15:21:33.8990932Z at Castle.Core.Internal.ReflectionUtil.Instantiate[TBase](Type subtypeofTBase, Object[] ctorArgs)
2020-12-28T15:21:33.8991346Z at Castle.Core.Internal.ReflectionUtil.CreateInstance[TBase](Type subtypeofTBase, Object[] ctorArgs)
2020-12-28T15:21:33.8991786Z at Castle.Facilities.Logging.LoggingFacility.CreateProperLoggerFactory(LoggerImplementation loggerApi)
2020-12-28T15:21:33.8992190Z at Castle.Facilities.Logging.LoggingFacility.ReadConfigurationAndCreateLoggerFactory()
2020-12-28T15:21:33.8992518Z at Castle.Facilities.Logging.LoggingFacility.Init()
2020-12-28T15:21:33.8992931Z at Castle.MicroKernel.Facilities.AbstractFacility.Castle.MicroKernel.IFacility.Init(IKernel kernel, IConfiguration facilityConfig)
2020-12-28T15:21:33.8993339Z at Castle.MicroKernel.DefaultKernel.AddFacility(IFacility facility)
2020-12-28T15:21:33.8993664Z at Castle.MicroKernel.DefaultKernel.AddFacility[T](Action1 onCreate)
2020-12-28T15:21:33.8994006Z at Castle.Windsor.WindsorContainer.AddFacility[T](Action1 onCreate)
2020-12-28T15:21:33.8994406Z at my.Migrator.Program.Main(String[] args) in path\src\my.Migrator\Program.cs:line 22
2020-12-28T15:21:38.0688578Z ##[error]Process completed with exit code -532462766.
2020-12-28T15:21:38.0716340Z ##[section]Finishing: Migrator
any ideas?
Thanks,
Amr Saafan
https://www.nilebits.com/
3 Answer(s)
-
0
Hi @amrsaafan
-
Do you also publish Migrator project or trying to run it from source code ?
-
Is it possible to check if
log4net.config
exists in the running directory ?
-
-
0
HI @ismcagdas,
1-yes I am running the Migrator.exe after publishing it.
2- no the log4net.config file is there in the root folder as the exe file -
0
Hi @amrsaafan
I tried to publish Migrator project locally and I can see the log4net.config in the output directory. Could you also try this locally ?