Main Site Documentation

Build .net gadgeteer project through command line


#1

Hi there!

I am trying to build the .net gadgeteer project through command line (using Visual Basic 2010, MS Framework v4.2, FEZ Spider 1.0 mainboard). How could I do this?

Also, would it be possible to execute command line arguments (I want the hardware display to show different things based on the command line argument variables)?

What I’ve tried so far in terms of building the project through command line is executing the two commands below in the terminal:
devenv /build Release MySolution.sln
devenv /build Debug MySolution.sln

The terminal tells me that the build is successful, however the hardware does not update.

Any feedback would be appreciated. Thanks!


#2

Thanks for the reply andre.m!

I’ve managed to run a gadgeteer project through terminal with this command:

devenv yourSolution.sln /run

However, it opens up the IDE (which builds, deploys then runs the project…) it takes quite some time. is there a way to run a project from command line without opening the IDE?

Thanks, any feedback would be appreciated!


#3

If you just want to build the binary files you should be able to run msbuild.exe {solution/projectfile}.


#4

@ GreenCK, I just want to clarify this. What you’re really asking for is the ability to deploy your app to a device. You have shown you can build the app, but you just haven’t deployed it.

MFDeploy.exe deploy:myfile.hex;myfile2.hex /i:usb:mydevice


#5

Hi @ Brett,

I didn’t realize that, thanks for correcting me. From the example you give me about the MFDeploy.exe, you mentioned .hex file as input, from the MSDN website I found it is image file, but where could I find it? When will it be created?

Also, is there difference between launching MFDeploy and devenv /deploy mySolution.sln? Thanks.


#6

@ GreenCK- Actually you need MFDeploy to extract hex file from the device after you have deployed it with VS. This is done to make it easier to deploy to multiple devices. So in your case it doesn’t help much if you do it only for one device.