To avoid loosing our files or database each time we start a new debug, in the properties of the project (right click on the root of the project and choose properties) there is a checkbox to allow Visual Studio 2015 to keep our settings data.
but in my case it doesn’t work and I don’t know why.
There is another option to tke a look: upper in the same property page, there is another checkbox
This checkbox must be unchecked. Obviously, it allows Visual Studio to delete the installed package and reinstall it. In this case we loose our data.
In any case I’ve loose my data… what I have to do? A friend of mine sayd “Pass to develop on Linux” but… I don’t think so 😀
Ok, after some days of fighting I’ve found a solution:
- start with debugging mode our application on RPi
- load/create our settings
- shut down the application
Up to this point no problem, it’s normal as we made. But now no we take another approach. Now if we want to debug our application we can’t run directly from Visual Studio without loose our settings. But on PRi there is already the remote debug running and we can deploy our modified solution withour overwrite settings and custom data. How? Ok, I explain:
- right click on project root in Solution Explorer
- choose Deploy
if you have rightly set the parameters to connect to your RPi, everything will be all right. Your modifies solution will be deployed.
Now we have to debug it. From menu Debug choose “Debug other Targets” and then “Debug installed App packages”
in the first combobox choose “Remote Machine”. The remote connection box will appear to choose the connection to your RPi
And now choose from list your application and push the button “Start” in the lower-right corner and your application will starts attached to your debugger! WoW!!! 😀
Sometime the connection box doesn’t show our RPi in the lower part of the window. We can try to enter manually the phisic address of our RPi. and press “Select” but sometime doesn’t work. The reason is thar RPi is not able to run the remote debugger. In this case we have to run it manually.
How can we do that? Simply! Connect to RPi with your browser, choose the IoTOnboardingTask application and run it if not running yet.
Enjoy!