Tuesday, October 25, 2011

Azure - The imported project microsoft.windowsazure.targets was not found

If you receive the following error:
"The imported project microsoft.windowsazure.targets was not found"
Two possible solutions.

1) You need to update your "Windows Azure Tools for Visual Studio" with the 1.4 August update.

       http://www.microsoft.com/windowsazure/sdk/

       Windows Azure Tools for Visual Studio (August 2011 update)

2) Or you are using the wrong targets if you wish to stay with the Windows Azure Tools for Visual Studio, March 2011 release.

Replace:
<Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />

With:
<Import Project="$(CloudExtensionsDir)Microsoft.CloudService.targets" />

and

Replace:
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.4\</CloudExtensionsDir>

With:
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\Cloud Service\1.0\Visual Studio 10.0\</CloudExtensionsDir>

Then reload the project in your solution, or add existing project.

6 comments:

  1. i was new to the cloud environment and after installation of the Tools was still not able to run cloud projects. your article helped me..thanks

    ReplyDelete
  2. Thanks, this article was really helpful!

    ReplyDelete
  3. Thanks I was too able to reload the project. Very usefull article. :)

    ReplyDelete
  4. I have windows azure project with sdk 1.8 and i am able to run it on my local machine but when i check in to TFS, check in is successful but building is not successful

    The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\1.8\Microsoft.WindowsAzure.targets" was not found.


    ReplyDelete
    Replies
    1. Looks like either your path is wrong in your cloud .csproj project file or your build server may just be missing the targets file completely.

      Delete
  5. This comment has been removed by the author.

    ReplyDelete