12

I was tring to deploy an ASP.NET Web Application to a Windows Azure Web Site by following the tutorial through this link: https://www.windowsazure.com/en-us/develop/net/tutorials/get-started/ After download the public profile, which is a ".PublishSettings" file, I go back to Visual Studio and right-click the project in Solution Explorer and select Publish from the context menu as the tutorial said. However, a warning box jumped up and it showed me that "The Web Publishing extension is not installed which is required to publish. You can install it from http://go.microsoft.com/fwlink/?LinkID=208120."

I already installed "Windows Azure SDK for .NET (VS 2012)" and I also tried to uninstall this and install again, but the same problem is still there.

Anyone knows how to solve this? I am really appreciated.

Chong Wang
  • 121
  • 1
  • 1
  • 4

11 Answers11

15

I ran into 2 issues, which were related. One was the web publishing extension is not installed which is required to publish, and the other was the web extension package did not load.

I'm upvoting and reposting user3918092's solution for others who run into this issue and do everything including:

  1. Deleting the ComponentModelCache out of
    C:\Users\...\AppData\Local\Microsoft\VisualStudio\12.0 and
    C:\Users\...\AppData\Roaming\Microsoft\VisualStudio\12.0
  2. Repairing Azure SDK 2.4 and VS2013U3 Uninstalling and reinstalling both Azure SDK 2.4 and VS2013U3
  3. Removing extensions from the solution
  4. Ignoring the extensions on VS startup
  5. Using devenv /setup and devenv /updateconfiguration to try to reset the configuration

The solution is:

Reinstall the following items to your GAC using the following commands from the vs command line run as an administrator:

gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Publish.dll"  
gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Internal.Contracts.dll"

Thanks to user3918092!

Marko
  • 20,385
  • 13
  • 48
  • 64
xyntiacat
  • 468
  • 1
  • 5
  • 13
  • 1
    I couldn't find Microsoft.VisualStudio.Web.Internal.Contracts.dll in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish but I found it in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VWDExpressExtensions\Microsoft\Web Tools\Publish . maybe because I use vs 2013 express. installing both files in gac solved the problem. Thanks for the comment! very helpful. – jivangilad Sep 15 '14 at 13:20
  • Of the steps decribed in the answer I just did the first one (deleting the cache) and the last one (adding the two dlls to the GAC), this solved my problem. – Martin Mar 28 '16 at 17:52
2

This has worked for me. I had Visual Studio express 2012 then installed Visual Studio 2013 needed the azure tools so I installed 2.4. I lost publishing at this stage and unistalled Visual Studio express 2012.

So that is how I think it got out of kilter.

The solution was to reset the assemblies for Contract and Publishing using the Developer command prompt as Administrator.

If you have used the default installation setting then this is probably the path

gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Publish.dll"
gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Internal.Contracts.dll"
Marko
  • 20,385
  • 13
  • 48
  • 64
T1mark
  • 31
  • 3
  • Using visual studio 2015 Community and did the update. same problem used hansmaad suggestion then installed the update again and all working if this helps – T1mark Jan 02 '16 at 11:57
2

I had the same problem on Visual Studio 2013 (Asp.net and web tools 2013 extensions have not been installed)

Solve it by re-install Visual Studio 2013 update 3.

http://www.microsoft.com/en-us/download/details.aspx?id=43721

vanderkorn
  • 136
  • 5
  • only today, 12-01-2014, I had to install update 4. But that DID fix this problem for me in one easy step. – Diana Dec 01 '14 at 17:05
2

I have the same problem. After reinstalling VS 2013 update 4 and Azure SDK 2.6 problem still persists.

But then I tried the next thing: In section Control Panel > Programs > Programs and Features select and repair Microsoft ASP.NET and Web Tools 2013.4.

And publish option started to work again.

Marko
  • 20,385
  • 13
  • 48
  • 64
micaklus
  • 31
  • 1
  • 6
2

Same issue with Visual Studio 2015.1 after installing a Web Tools update.

The assmeblies that have to be installed into gac are now:

gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Publish.dll"
gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Publish.Core.Contracts.dll"
gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Publish.Contracts.dll"
hansmaad
  • 18,417
  • 9
  • 53
  • 94
  • Thank you Hansmaad! That resolve it for me as well with Visual Studio 2015 update 3 after I was able to see the Publish folder under Web Tools. The installations failed because of NuGet failures which required me to delete any folder under Common7/IDE/Extensions that contained a Nuget file name. Otherwise the extension installation failed with an error that the file was in use. The CORE issue lies => https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/3487794-create-a-remove-all-remnants-of-visual-studio-fro I'm not so much a Microsoft Crony any more... – BillKrat Oct 06 '16 at 16:38
  • BTW, Microsoft Visual Studio team *closed* the issue in link above which has plagued over 3,960 developers (since 2012) by providing a utility application "scorched" that didn't work for me. I went to download VS Preview 6 (rewriting installation) and it won't install because my Windows 7 doesn't have required KB (IT security won't permit me to install). Can't believe they are letting us flounder on this - I lost a week of development time... – BillKrat Oct 06 '16 at 16:45
1

I had this issue upgrading VS 2013 Ultimate from update 3 to 4. I had also a message about Microsoft.VisualStudio.Web.PasteJson.JsonPackage did not load properly when loading a Solution. Repairing VS was enough for me to work again the publishing option.

vicgilbcn
  • 149
  • 3
0

http://connect.microsoft.com/VisualStudio/feedback/details/758298/not-able-to-publish-web-application-after-installing-visual-studio-2012-rtw has a work-around but it's a painful reinstall with additional folder deletion.

Ihar Bury
  • 485
  • 3
  • 10
0

register GAC also work when have this problem after update VS 2013.2 to VS 2013.3

Adam Wyżgoł
  • 567
  • 4
  • 6
0

I had similar problem, but my error is related to scaffolding item.

I need to uninstall visual studio and went through all the related folders, registry and re-install visual studio in order to make it work!

Folders that I checked:

  • %App Data%
  • %Program Data%
  • %Program Files%
  • Windows

Hope that help :)

terencetcf
  • 231
  • 2
  • 5
0

I uninstalled VS2012 again. Before I re-installed (a 3rd time), I went to my user's AppData and Documents folders and found all instances of Visual Studio 2012 and deleted them. Then I re-installed VS2012 and now Web Publishing is working.

Folders I deleted after uninstall:

  • C:\Users\USERNAME\Documents\Visual Studio 2012
  • C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\11.0
  • C:\Users\USERNAME\AppData\Roaming\Microsoft\Microsoft Visual Studio\11.0
  • C:\Program Files\Microsoft Visual Studio 11.0
  • C:\Program Files (x86)\Microsoft Visual Studio 11.0
Rahatur
  • 3,147
  • 3
  • 33
  • 49
0

I had this happen today out of the blue for a vs2013 project that was publishing fine previously.

I solved it by downloading a 'Visual Studio Web Publish Update' package from here.

user326608
  • 2,210
  • 1
  • 26
  • 33