CLR Re-deployment problem

  • I have a CLR project with a few simple functions in them. They have been running fine on our server for quite some time now.

    I recently had reason to add a new CLR function into the mix.

    I added the function and tested a deployment of the project to a new "test" database - no problem.

    I then attempted to re-deploy my project to our production server, and I receive the following error:

    "The assembly module 'HexConvert' cannot be re-deployed because it was created outside of Visual Studio. Drop the module from the database before deploying the assembly"

    Problem is, that's not true. This project WAS created using Visual Studio, so I'm not sure why it's saying that. This is a 24x7 database. I cannot "drop" the assembly. How do I get changes to this assembly deployed to my server?

    It's SQL 2005 - 9.00.3282.00 (X64). The database is under a MIRROR setup (high security mode).

    Any help would be greatly appreciated.

    Jim

  • I have received this type of error on several occasions. I have found that this type of error can be reproduced if I manually deploy, (outside of Visual Studio/NOT using Visual Studio to do the deploy), via a script. Then, the next deploy I attempt is attempted via IDE (Visual Studio) by right clicking on the SQL CLR project and select the deploy option. If I deploy via the IDE, then objects inside of the database are stamped "as having been deployed via the IDE" and the next attempt to deploy via the IDE checks the stamp. If it's not there (because I made a manual deployment), then I get this error. The solution is to drop all CLR functions, CLR udf's, CLR stored procedures, etc manually, then the next IDE deploy works for me.

    So my question for you is "Did you make a manual deploy into your production environment via an install script, but now your actually accessing your production environment via and IDE????

  • I have had exactly the same problem for exactly the same reason..

    CEWII

  • I can easily answer that question. Since I have absolutely NO IDEA how I would deploy this using a script, the only way we have ever deployed was via the IDE.

    Very odd. We have essentially worked around it so far, since the functions we were previously wrote were simple and have not needed updates (yet - we've been lucky), we've "closed" that project and started a new project for additional CLR functions.

    Hopefully, our luck will remain.

    Thanks,

    Jim

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply