Question

I have a C# Console Application that uses System.Data.DataSetExtensions that I can run smoothly on the client's server through the command line. The only thing I did was to copy the bin/Release directory contents to a specific directory on the server and run the app through the cmd.

Now, I want to run the same app through an SQL SERVER Job. I've tried both the CmdExec and T-SQL options, the latest using xp_cmdshell. I've also tried running the program without the job, just with the xp_cmdshell on a new query tab.

I always get this error:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

Can someone help me to fix this? Why can I run the program through the cmd line and not through Sql Server?

Thx a lot!

Was it helpful?

Solution

Make sure that the database server (where SQL Server was installed) has .NET Framework 3.5 installed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top