0

I am curious about making publishes without opening the project and choosing the "Publish" option from the context menu. I know that Visual Studio heavily uses external applications as features and use them from the IDE, so I think I can manage it by writing an application using TFS and VS external API calls. I have made a search but could not find anything useful for it.

Can anyone help on suggesting a strong entry point for my requirements please?

user3021830
  • 2,784
  • 2
  • 22
  • 43

1 Answers1

2

It depends a little on the type of project you're trying to publish, but generally the publish action is executed through MsBuild under the hood.

There are additional msbuild targets that are used to package and publish packages to a remote location.

msbuild.exe mysolution.sln /t:package,publish

You can also set the property DeployOnBuild to true to have MsBuild run the publish action as part of a normal build:

msbuild.exe mysolution.sln /t:build /p:DeployOnBuild=true

See also:

Community
  • 1
  • 1
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Thank you very much for your help, but I would like to be completely out of IDE. Using tjhe command prompt sounds like a good idea, which I can make calls from a desktop application as well. Sorry for not presenting details. My project ms a MVC Web application and I also have created publish profiles for the project as well. I am publishing to the file system to certain location on my HDD. Is it possible to calla publish proıfile externally or should I call a build script whih makes a publish at the end? – user3021830 Feb 12 '16 at 08:29
  • 1
    There are w whole bunch of build parameters that influence what happens on deploy. Among them the publish profile: `/p:PublishProfile=MyProfile`. See: http://stackoverflow.com/a/8664145/736079 – jessehouwing Feb 12 '16 at 08:47
  • Thank you very much for your help. They seem to be very helpful. I appreciate. – user3021830 Feb 12 '16 at 08:52