{"id":166,"date":"2010-01-12T20:02:00","date_gmt":"2010-01-12T20:02:00","guid":{"rendered":"http:\/\/turtlellc.com\/index.php\/failure-adding-assembly-to-the-cache-cannot-create-a-file-when-that-file-already-exists\/"},"modified":"2010-01-12T20:02:00","modified_gmt":"2010-01-12T20:02:00","slug":"failure-adding-assembly-to-the-cache-cannot-create-a-file-when-that-file-already-exists","status":"publish","type":"post","link":"https:\/\/www.turtle.works\/knowledge\/failure-adding-assembly-to-the-cache-cannot-create-a-file-when-that-file-already-exists\/","title":{"rendered":"Failure adding assembly to the cache: Cannot create a file when that file already exists"},"content":{"rendered":"<p>So trying to add a Timer Job to the GAC causes:<\/p>\n<p>&#8220;Failure adding assembly to the cache:   Cannot create a file when that file already exists&#8221;<\/p>\n<p>How do you get around it? well, try these things<\/p>\n<p>1. if you have any dos windows\/windows explorer windows in the assembly folder (or deeper) then move out of those folders (or close the windows down)<\/p>\n<p>2. if you have Visual Studio open, and your project has a reference to your assembly, then you will need to close this down. Give it a while tho, even once your VS 200x has disappeared it is still unloading in the back ground<\/p>\n<p>3. GacUtil \/cdl     &#8211; clears the assembly cache<\/p>\n<p>4. do a IIS reset, if you have used the assembly in any web applications<\/p>\n<p>5. reboot :'(<\/p>\n<p>Thanks to <a href=\"http:\/\/power-programming.co.uk\/post\/2008\/06\/GacUtil-Failure-adding-assembly-to-the-cache---Cannot-create-a-file-when-that-file-already-exists.aspx\">Victor<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So trying to add a Timer Job to the GAC causes: &#8220;Failure adding assembly to the cache: Cannot create a file when that file already exists&#8221; How do you get around it? well, try these things 1. if you have any dos windows\/windows explorer windows in the assembly folder (or deeper) then move out of &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.turtle.works\/knowledge\/failure-adding-assembly-to-the-cache-cannot-create-a-file-when-that-file-already-exists\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Failure adding assembly to the cache: Cannot create a file when that file already exists&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3,12,20],"tags":[],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-net","category-assembly","category-gac","category-sharepoint"],"_links":{"self":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":0,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.turtle.works\/knowledge\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}