No Main Method in MathWidgetSample

I recently got the ATK and was wanting to take a look at the Math Widget Sample. Upon opening and building the supplied solution it fails saying Program does not contain a static 'Main' method suitable for an entry point. I do not get this error with the Geometry, Single-line, or Singe-char Widgets. Those will all deploy, build, and run correctly. I am using the most recent version of Visual Studio, the Windows 10 Development Kits, Nuget, .Net, and so on, as I just re-installed/updated everything a few weeks ago. I enabled Developer Mode in my Windows 10 system settings as well. I tried, unsuccessfully, to just create a new class containing a public static void Main(String[] args) method header, but even leaving the method completely blank results in Object reference not set to an instance of an object. error. What value is receiving a null pointer I have no idea. I'm rather lost as to what to do, since I was looking at the samples to learn how it works. Thanks.

Our Windows package should work properly on latest version of Visual Studio community as well, so could you please confirm, you installed Visual studio 2015 Update 1 14.0.24720.00 version?

Regarding the error messages, you report us, it seems Visual Studio has not opened the project as 'Universal Windows' App. Could you please check when you open the project 'MyScript Application Toolkit samples', you can see 'Universal Windows' for each sample in the 'Solution Explorer' window?

Best regards

My exact version number is 14.0.25123.00 Update 2. So, a version newer than the one you mentioned. I see (Universal Windows) next to each one, yes. However, again, every other widget sample works except MathWidget. I have also copied in my certificate properly in case that's the next question. I tried doing a fresh install of MyScript and simply opening the solution and deploying but it did not work.

Thanks for those details.
I have just made a test with Visual Studio 2015 Update 2, I don't face any issue on my side.
Could you please try to delete ATK nugets and launch again MathWidget Sample?
It should be located in your user folder:

Thanks for your patience

I did as you suggested and deleted all of the MyScript ATK folders within .nugetpackages. There were a total of nine of them. They were then re-created once I rebuilt the MathWidgetSample (Universal Windows) project within the sample solution. It still failed claiming there was no entry point. Granted, I'm not very familiar with C# code (the reason I've been trying to get the samples to work), but I couldn't locate the main methods for the other working sample projects either. I wish I could offer some more information on why it's not working, but I'm new at all this.

Thanks for your feedback.

We are currently unable to figure out why you got such error on your side. Please find below a screenshot when you open the MathWidgetSample.sln in Visual Studio(but opening MyScript Application ToolKit Samples.sln should work as well)
Could you please make sure you have enabled the option 'Set up as startup project' for MathWidgetSample as shown below?

Best regards

I have zero idea why this fixed it, but I tried re-installing my ATK files and it seems to be working now. I didn't do this before because I kept all the original downloaded files and copied them so as to have a backup. I was using a clean copy, but I guess somehow something got corrupted? No idea. Anyways, thanks for trying to help. Apologies it turned out to be my fault.

I am glad it is working now!
Thanks for your feedback.

Best regards

Login or Signup to post a comment