Hi Scriptcs Team,
I am a beginner in scriptcs and so here I am writing a code to retreive and execute database DDL,DML statement through scriptcs.I am using following dlls
r "Microsoft.SqlServer.ConnectionInfo.dll";#r "Microsoft.SqlServer.Smo.dll";
in the scriptcs code to execute sql statements. But the problem is that above dlls belongs to version v2.0.50727 where as other dlls are in version dotnet framework version 4.0.At first I thought make all dlls compatible to version v2.0.50727 but it might not be good solution as we are using hashtables other features which are not available in .NET framework version 2.0.Thereby while running the scriptcs file it returns as "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime".By Setting below attribute supportedRuntime version="v4.0" and useLegacyV2RuntimeActivationPolicy="true" for startup tag in app.config also does not solve the error.Still it shows Mixed mode assembly error.May be I have missing anything.I have found somewhere instead of app.config file rename file as script.exe.config or program.exe.config.I don't get enough information on these files.Please help me to point out the issue.
Hi Scriptcs Team, I am a beginner in scriptcs and so here I am writing a code to retreive and execute database DDL,DML statement through scriptcs.I am using following dlls
r "Microsoft.SqlServer.ConnectionInfo.dll";#r "Microsoft.SqlServer.Smo.dll";
in the scriptcs code to execute sql statements. But the problem is that above dlls belongs to version v2.0.50727 where as other dlls are in version dotnet framework version 4.0.At first I thought make all dlls compatible to version v2.0.50727 but it might not be good solution as we are using hashtables other features which are not available in .NET framework version 2.0.Thereby while running the scriptcs file it returns as "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime".By Setting below attribute supportedRuntime version="v4.0" and useLegacyV2RuntimeActivationPolicy="true" for startup tag in app.config also does not solve the error.Still it shows Mixed mode assembly error.May be I have missing anything.I have found somewhere instead of app.config file rename file as script.exe.config or program.exe.config.I don't get enough information on these files.Please help me to point out the issue.
Thanks Boney