{"id":2140,"date":"2017-12-07T11:16:31","date_gmt":"2017-12-07T11:16:31","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2140"},"modified":"2020-01-09T09:45:04","modified_gmt":"2020-01-09T09:45:04","slug":"help-with-msbuild-4-and-custom-tasks","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/help-with-msbuild-4-and-custom-tasks\/","title":{"rendered":"Help with MSbuild 4 and custom tasks"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Help with MSbuild 4 and custom tasks<\/strong><br \/>\nI&#8217;m trying to build a custom task using the Task base class in Microsoft.Build.Utilitieis.v4.0. I have the task built and compiled just fine but I get this error<\/p>\n<p>C:\\sandbox\\c-wundram\\msbuild\\TalTrade.Importer\\TestImporterTask\\TestImporterTas<br \/>\nk.csproj(58,5): error MSB4062: The &#8220;Importer&#8221; task could not be loaded from the<br \/>\nassembly C:\\sandbox\\c-wundram\\msbuild\\TalTrade.Importer\\TalTrade.Importer\\bin\\<br \/>\ndebug\\TalTrade.Importer.dll. Confirm that the <UsingTask> declaration is corre<br \/>\nct, that the assembly and all its dependencies are available, and that the task<br \/>\ncontains a public class that implements Microsoft.Build.Framework.ITask.<\/p>\n<p>However the path is correct, and the class which subclasses Task is public. I tried checking the binding using fuslogvw, and it doesn&#8217;t appear to even attempt to load my assembly. Does anyone have any ideas of what might be going wrong? The only depenendencies my assembly has is on the framework, and on the TFS 2010 APIs.<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>boris replied the topic: Re:Help with MSbuild 4 and custom tasks<\/strong><br \/>\nHiho,<\/p>\n<p>As far as I understand, you are *not* talking about Rational BuildForge (or there may be several buildforge names).<\/p>\n<p>If you want to get some answers, you should repost in a more appropriate forum (e.g. MS Build).<\/p>\n<p>Cheers,<\/p>\n<p>&#8212;<br \/>\nboris<\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Help with MSbuild 4 and custom tasks I&#8217;m trying to build a custom task using the Task base class in Microsoft.Build.Utilitieis.v4.0. I have the task built and compiled just fine but I get this error C:\\sandbox\\c-wundram\\msbuild\\TalTrade.Importer\\TestImporterTask\\TestImporterTas k.csproj(58,5): error MSB4062: The &#8220;Importer&#8221; task could not be loaded from the assembly C:\\sandbox\\c-wundram\\msbuild\\TalTrade.Importer\\TalTrade.Importer\\bin\\ debug\\TalTrade.Importer.dll&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[366],"class_list":["post-2140","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-msbuild"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2140"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2140\/revisions"}],"predecessor-version":[{"id":2143,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2140\/revisions\/2143"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}