4

I have received a SharePoint project which has got some visual webparts in it and I would like to create a wsp. I clicked on Publish button, but nothing happens. Nothing happens in the output window and there is no package (wsp) in the specified folder.

Any ideas why this is happening?

  • Usually clicking "Publish" prompts you with a dialog box asking if you want to publish to the site or to the file system. Do you see that? – RJ Cuthbertson Jan 21 '14 at 14:46
  • @RJCuthbertson - yes, I get the dialog box and in there I specify the location for the wsp, but nothing happens. – Imir Hoxha Jan 25 '14 at 11:35
  • Are you running VS as an administrator? – RJ Cuthbertson Jan 26 '14 at 22:02
  • yes, VS is running as administrator – Imir Hoxha Jan 27 '14 at 11:18
2

If you just want to create a .wsp file, you can right click the project and select "Package" to create the .wsp file instead of using publish. .wsp file will be created in the projects debug folder.

Update: I just saw "Visual Studio 2012" label. In Visual Studion 2010, you could create the .wsp file like this. I guess Visual Studio 2012 Would be the same.

  • There is no package option in VS 2012. It's now "Publish". – RJ Cuthbertson Jan 21 '14 at 14:46
  • 2
    It is the same concept, but what the question is saying is that when he clicks it, it is not generating a wsp. – RJ Cuthbertson Jan 21 '14 at 14:47
  • Maybe VS2012 is trying to generate wsp but it takes long time. If there's no error or anything, I guess, I would think that at first. – newbie Jan 21 '14 at 14:55
  • I don't think it's even getting to that point. In VS2012 it prompts you with a (super annoying) dialog every time you want to publish that asks if you intend to publish to the SP site or to the local file system. I'm not sure he's even seeing that dialog. – RJ Cuthbertson Jan 21 '14 at 15:06
  • I tested the solution in my colleague's computer and the publish button works fine there. I could see the wsp. I turned to mine and I reinstalled Visual Studio 2012 and I still fazing the same issue. – Imir Hoxha Jan 22 '14 at 13:21
0

you could do within your .csproj

<PropertyGroup>
    <BuildDependsOn>$(BuildDependsOn);CreatePackage</BuildDependsOn>
</PropertyGroup> 

for other possible solution you could check this out!

https://stackoverflow.com/questions/16590519/visual-studio-2012-publish-option-event-nameclr20r3

  • I will give it a try when I get back to work and will let you know. – Imir Hoxha Jan 25 '14 at 11:35
0

If you get any error like the WSP can not be generated since source path is too long then please cut-paste your complete solution to another location (like desktop) then after opening solution again try to publish. It worked for me! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.