scarpacci
scarpacci

Reputation: 9194

Set SQL CLR assembly PERMISSION_SET in Visual Studio

Is it possible for me to have the deployment / scripts within Visual Studio generate my assembly with "PERMISSION_SET" set to "EXTERNAL_ACCESS" instead of "SAFE". I can obviously build the project and then modify the script, but I would like to have that be a setting so I can re-build then deploy to my Development instance.

Probably something I am looking over, but I can't seem to find where I could set that build property for the assembly creation.

Thanks,

S

Upvotes: 1

Views: 4420

Answers (3)

Glenn Packer
Glenn Packer

Reputation: 221

Visual studio 2015 and sql server 2014 the option in the visual studio project does not seem to work. I would suggest adding a new script to the deployment with the simple command

ALTER ASSEMBLY {assembly name} with PERMISSION_SET = UNSAFE / SAFE / EXTERNAL_ACCESS

using this also means you can change the perms on a per assembly basis

Upvotes: 1

scarpacci
scarpacci

Reputation: 9194

If found the setting in Visual Studio. You can go to Project Properties -> Database here you select the Database to deploy to along with the Permission level of the CLR Assembly.

--S

Upvotes: 0

Michal Barcik
Michal Barcik

Reputation: 662

When the assembly is deployed together with the SSAS project (in one solution) you can change the permission:Solution explorer

Assembly properties

Upvotes: 1

Related Questions