• the key is to look in the Output window for the issue:

    i built a new project with your code, changed it to External and tried to deploy.

    i had the wrong default run time the first pass.(4.0).

    once i changed it to 3.5, it worked for me (on a trustworthy database)

    what is the contents of your output window after the error?

    this is the results of the output window:

    ------ Build started: Project: SqlServerProject1, Configuration: Debug Any CPU ------

    SqlServerProject1 -> C:\_PA\Workspace\All_Workspaces\Workspace_CLR\SqlServerProject1\SqlServerProject1\bin\Debug\SqlServerProject1.dll

    ------ Deploy started: Project: SqlServerProject1, Configuration: Debug Any CPU ------

    Build started 6/1/2012 9:39:22 AM.

    SqlClrDeploy:

    Beginning deployment of assembly SqlServerProject1.dll to server DEV223 : SandBox

    The following error might appear if you deploy a SQL CLR project that was built for a version of the .NET Framework that is incompatible with the target instance of SQL Server: "Deploy error SQL01268: CREATE ASSEMBLY for assembly failed because assembly failed verification". To resolve this issue, open the properties for the project, and change the .NET Framework version.

    Deployment script generated to:

    C:\_PA\Workspace\All_Workspaces\Workspace_CLR\SqlServerProject1\SqlServerProject1\bin\Debug\SqlServerProject1.sql

    Creating [SqlServerProject1]...

    C:\_PA\Workspace\All_Workspaces\Workspace_CLR\SqlServerProject1\SqlServerProject1\bin\Debug\SqlServerProject1.sql(37-37): Deploy error SQL01268: .Net SqlClient Data Provider: Msg 6257, Level 16, State 1, Line 1 CREATE ASSEMBLY for assembly 'SqlServerProject1' failed because the assembly is built for an unsupported version of the CLR runtime.

    An error occurred while the batch was being executed.

    Build FAILED.

    Time Elapsed 00:00:10.82

    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!