Article ID: 928961
Article Last Modified on 12/12/2006
APPLIES TO
- Microsoft Visual Studio 2005 Team Edition for Database Professionals
SYMPTOMS
Consider the following scenario. In Microsoft Visual Studio 2005 Team Edition for Database Professionals, you create a new database project. In the database project, you use the CREATE ASSEMBLY statement to add a common language runtime (CLR) assembly to the project. You use a file path to reference the CLR assembly.
In this scenario, you may receive an error message that resembles the following:
WORKAROUND
To work around this issue, use one of the following methods.
Method 1: Use a binary representation of the file
Use a binary representation of the file in the CREATE ASSEMBLY statement. For example, use code that resembles the following code example.
CREATE ASSEMBLY Test1 FROM 4D5A90000300000004000000FFFF
Method 2: Deploy to a test server
If you must include the database project in a solution that also includes a server project, deploy the server project to a test server. After you deploy the server project, follow these steps:
- Create a temporary database project.
- Import the schema from the database to which the server project was deployed.
- Copy the generated script for the CREATE ASSEMBLY statement.
STATUS
This behavior is by design.
MORE INFORMATION
Steps to reproduce the behavior
- Start Visual Studio 2005 Team Edition for Database Professionals.
- On the File menu, point to New, and then click Project.
- Expand Database Projects, and then click Microsoft SQL Server.
- Click SQL Server 2005, type Database1 in the Name box, and then click OK.
- In Solution Explorer, expand Schema Objects, right-click Assemblies, point to Add, and then click New Item.
- Select the Programmability category, select the Assembly template, type Assembly1 in the Name box, and then click Add.
Replace the code in the Assembly1.assembly.sql file with code that resembles the following code example.
CREATE ASSEMBLY [Assembly1] FROM N'<AssemblyPath>\<AssemblyName>.dll' WITH PERMISSION_SET = SAFE;
REFERENCES
For more information about the CREATE ASSEMBLY statement, visit the following Microsoft Developer Network (MSDN) Web site:
Keywords: kbdevelopment kbtshoot kberrmsg kbprb KB928961