c# - DLL containing custom attribute remains locked -
i trying write attribute apply security method. this:
[customauthorization(securityaction.demand)] public void dosomething() { //do }
so have attribute on assembly:
public sealed class authorizationattribute : codeaccesssecurityattribute { public override ipermission createpermission() { if (!/*authorize here*/) { return new custompermission(permissionstate.unrestricted); } throw new exception("identificationfailure."); } } public authorizationattribute(securityaction securityaction) : base(securityaction) { } }
so far works. run main program , job.
now go , modify assembly having attribute, build it. no problem.
i go in main program try build , there fails. cannot copy new built dll because old 1 still in use process.
does have idea happening here?
if you're using vs2010, there issue vhost.exe not releasing instance. can end process on until ms comes out fix.
Comments
Post a Comment