SQL Server Agent Cannot Set Off .NET Core Console Job

65 views Asked by At

I'm trying to set off a C# Console Job from SQL Server Agent to do some ETL work and running into an issue where it's as if the Agent isn't running at all.

This eventually led me to do a test...

I created 2 C# Console apps. One under .NET Framework 4.7.2 and the other .NET 6.
They literally do nothing except write a txt file to a shared drive.

File.WriteAllText(@"\\myservername123\WriteTEST\log.txt", "6");

They both run fine from Visual Studio, double clicking the exe, or starting the exe from cmd.

I placed them in a shared file location which the sql server agent has access to and setup a Job which runs the exe thru PowerShell.

The .NET Framework version runs without issue while the .NET 6 version does nothing.
Why?

SQL Server Version: 2016

0

There are 0 answers