When I deploy the console app through the pipeline(pipeline has clean and rebuild ps1 scripts) the app works ok but while processing large files it throws System.OutOfMemoryException error while reading some values from the database.
But if I rebuild the app from visual studio 2022 and deploy it manually then it works ok(including large files).
The Server RAM is 24GB and works fine when we manually deploy the code which is complied through VS
Also noticed that the build which happens through the pipeline has few more .dlls generated as compared to the VS release mode.
Some variable details from the above image which is the build script in the pipeline.
$buildConfig = Release $targetPlatform = x64 (also tried with Any CPU but no luck) $msbuildPath = C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MsBuild.exe $sdkDir= C:\Program Files\dotnet\sdk\6.0.202
Not sure how to move forward in this issue.