Hello, I’m running the following code:
database.UserDefinedFunctions[name, schema].Script(dropstoredProcOptions);
With this as dropstoreProcOptions:
ScriptingOptions dropstoreProcOptions = new ScriptingOptions();
dropstoreProcOptions.IncludeIfNotExists = true;
dropstoreProcOptions.ScriptDrops = true;
dropstoreProcOptions.IncludeDatabaseContext = false;
If you run the .Script() function without any parameters no errors are thrown, however once you pass ScriptingOpstions as a parameter the following error is thrown: ArgumentOutOfRangeException
Any help or suggestions on how I could better debug it would be appreciated.
Thank you.
Arg haha… The project that generated the ScriptingOptions was using the version 9.0 dll and the project that was making the call to script() was uisng 10.0 dll of SqlServer.SMO