开发者

Debugging ClickOnce deployed VB.NET application

I am new to ClickOnce deployment and at first glance it seems a great way to maintain .NET applications updated with ease. I am developing a simple application that stores information on a .mdb database and over some XML files. I understood how to use the "data" folder with ClickOnce, and I am developing the part of my application that should migrate the data from older versions after a ClickOnce update.

Now I need to debug that part of my code that only runs when the application is in "networkDeployed" mode. So actually I'm doing the following really slow process to test a new deployed version:

  • Publishing the application on a provisional website (I can choose between a faster locale IIS site or a real online one)
  • 开发者_运维问答Installing the application from the deploying website (the first time) or running the old installed application so it automatically catch new updates and gets updated...
  • Running the application

So basically I have two problems here:

  • The whole process is much too slow :/
  • I'm running the application as every other application directly from the OS, so I can't get access to the debugger...

I am pretty sure that there is a better way to test ClickOnce deployed applications... What could it be?


I don't have any experience with ClickOnce myself yet, but if the application is running locally from your provisional website and you have PDB files and source code for it, you can attach the VisualStudio debugger to it yourself (manually, using the "Attach to process..." menu item) and should still be able to debug the application like you would normally.


I have in the past added command line args that are only used for debugging so as to make the app pretend it in "networkDeployed" mode etc.

Otherwise attaching the debugger, or adding a call to Debugger.Break() to your main methed is a good option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜