Friday, October 31, 2014

Missing certificate for authenticated push notifications: Certificate for authenticated push notifications

Problem:
Finally we have approval to push this application and I was getting the following warning in Windows Phone Store

"Missing certificate for authenticated push notifications: Certificate for authenticated push notifications"
 
I have no more options than before. I have no push notifications in use.
 
Solution:
 
You should check your WMAppManifest.xml file. Do you have ID_CAP_PUSH_NOTIFICATION defined there?
 

Tuesday, October 28, 2014

HP Probook 6565b won't power on!!!!

Tried to power on my work pc and got nothing but a loud fan and not much else.  I was sure that my laptop was toast. I was thinking that a component had failed.  Then I went over to the HP forums and
found the solution:


Solution:


Following solution solved the problem for me:

- after power on when the HP screen is shown press ESC key within the first 2-3 seconds
   (after approximately 5 seconds the system did not respond anymore)
- at the prompt "Login into F10 as a guest user" select "Yes"
- go to Systemm Configuration tab
- select Boot options
- highlight "Multiboot Express Popup Delay (Sec) and press "Enter" key
- change value by "UP/DOWN" keys (arrows) to minimum "05" and press again "Enter" key
- click on "Exit" (bottom right)
- on the "Save Changes" prompt select "Yes"

Now the notebook will boot again and you should see the Multiboot Express Popup menu (after the initial HP Screen).
Use the UP/DOWN keys to select "Notebook Hard Drive" and then press the "Enter" key.
Now the Notebook did boot from the HDD, and I hope that your's will too :-)

Looks like in my case, something with the Notebook Upgrade Bay got "screwed up" when the Notebook went into hibernation due to low battery, because also boot from CD-ROM was not working.




Source
http://h30434.www3.hp.com/t5/Notebook-Hardware/HP-Probook-6560b-won-t-power-on/td-p/1443819

Friday, October 17, 2014

Randomize boolean method in C#

I just saw this slick little trick in a Xamarin class.  Instructor needed to have a sample class randomly return a true or false. 

This is so simple:

public bool IsTrue()
{
return new Random().Next() % 2 == 0;
}

Wednesday, October 15, 2014

MVVMcross mvxException failed to construct and initialize viewmodel check MvxTrace fo more information

Problem:

We are trying to construct the iOS layer to our MVVMcross project.  We have built the core for the initial ViewModel and wanted to add the iPhone layer.  The project when in just fine and the Mac Host even compiled everything. 

Once I ran the solution, I get this runtime error in the iPhone Simulator.

Solution:

Lots of great information about possible solutions at stackoverflow.  However, my problem was the SQLite plugin.  I neglected to add the plugin to my iPhone Layer and once I added it the app runs fine.


Source:
http://stackoverflow.com/questions/18940820/how-do-you-initialize-themvvmcross-sqlite-plugin

Tuesday, October 7, 2014

Install NuGet Packages Offline - Visual Studio

Problem:
You are offline and trying to create a VS project with NuGet Package dependencies.
The challenge is how to get them.

Solution:

Use the cached copies on your machine stored at, %LOCALAPPDATA%\NuGet\Cache.

1.) Start Visual Studio and Open the package manager
  • Tools > NuGet Package Manager > Package Manager Settings
  • Select Package Sources in left hand menu
2.) Add Cache package to package manager.
  • Above the Available Package Sources window are 4 icons
  • Select the + and this will add a new source
  • Highlight the new entry
  • Edit the Name field, provide a name of your choosing
  • Source field add full path to the NuGet Cache
    • Find it by opening a  windows explorer window and typing the path, %LOCALAPPDATA%\NuGet\Cache
    • This will resolve to the path to your local cache
  • Select Update
3.) Your Done.

WARNING: Realize that this is only valid until you clear your nuget cache.

Source:
http://nuget-offline.blogspot.com/#!

Nuget Manager showing packages which have been deleted.

Problem:
We have moved a project out of TFS and onto a new machine.  The packages where not being cleare up with the Package Manager Console.  Tried several times to refresh.  The


Solution:

Option 1:

1.)Tools > NuGet Package Manager > Package Manager Console
2.)Update-Package -Reinstall -Project iWatch.Core

If that does not work then try:

Option 2:
1.)Tools > NuGet Package Manager
2.)Remove all nuget packages
3.)Find the packages file in the project this should be at the root of the project.  Open the file and clear out the xml entries.
4.)Manually reinstall packages.


Source
http://stackoverflow.com/questions/13085480/restoring-nuget-references

Monday, October 6, 2014

MvxIoCResolutionException: Failed to resolve parameter for parameter pictureChooserTask of type IMvxPictureChooserTask when creating Collect-A-Bull.Core.ViewModels.AddViewModel

Problem:

Using Stuart Lodge's excellent N+1 series, I stumbled in Session N+1 - 14.  This is where the pictureChooserTask is introduced.

 I was getting this error which absolutely baffled me:

MvxIoCResolutionException: Failed to resolve parameter for parameter pictureChooserTask of type IMvxPictureChooserTask when creating  Collect-A-Bull.Core.ViewModels.AddViewModel


Solution:

I would only get this error at runtime which lead me down a path towards the solution.
Stuart reminded me that what I was missing was the bootstrap:

To make the plugin available, you'll need to reference the plugin core and touch assemblies, and you'll need to include a bootstrap class - like https://github.com/MvvmCross/NPlus1DaysOfMvvmCross/blob/master/N-08-Location/Location.Touch/Bootstrap/LocationPluginBootstrap.cs

What I needed to add in my UI layer was the bootstrap folder with the PictureChooserPluginBootstrap class.

using Cirrious.CrossCore.Plugins;
namespace PictureTaking.Phone.Bootstrap
{
public class PictureChooserPluginBootstrap
: MvxPluginBootstrapAction<Cirrious.MvvmCross.Plugins.PictureChooser.PluginLoader>
{
}
}


Once I had this in place the viewmodel loaded correctly and I was able to proceed.


Source:
http://answer.techwikihow.com/1004999/ioc-resolving-dependencies-mvvmcross.html

https://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-plugins#picturechooser

NuGet Error in Visual Studio - Specified path, file name or both are too long. 260 vs. 248

Trying to update some NuGet packages and had the package refuse to deploy giving this message:

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Solution:
Turns out that Visual Studio 2012 has a fixed limit length on property paths of 248 characters.
My package length was 260 characters.  The fix is to not nest your project so deep, ie. shorter paths!!

Microsoft know about the issue:

Hello everyone and thank you for the feedback and for voting on this issue. We understand that this can be a frustrating issue, however, fixing it requires a large and complicated architectural change across different products and features including Visual Studio, TFS, MSBuild and the .NET Framework. Dedicating resources to this work item would come at the expense of many other features and innovation. Additionally, if we removed this limitation from our first party tools it will still likely exist elsewhere in Visual Studio’s ecosystem of extensions and tools. For these reasons, we are declining this suggestion and returning return everyone’s votes so they can be applied to other items. In the interest of delivering the most value to our customers we sometimes have to make very difficult cuts, and this is one of them.
Thank you,
Will Buik,
Visual Studio – Project and Build Team


Source:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2156195-fix-260-character-file-name-length-limitation

Saturday, October 4, 2014

Windows 10 Preview install on VHD


1. Download Windows 10 Preview from Microsoft preview site.  

2. Run disk management tool “diskmgmt.msc” to create blank vhd.

3. Select Action > Create VHD.

3. Once you have VHD file , use run disk management tool “diskmgmt.msc”.
4. Select “Attach VHD” option from the “Action” Menu.
5. “Select/Enter” path to VHD location
6. Windows will mount the VHD and assigns drive letter. Note down the drive lettter. In my case it is mount as “G” drive. Now from the explorer you can see the “G” drive.
7. Launch command prompt in “Administrator” mode

8. Now mount the Win 10 preview iso using disk management tool repeat step 4.

9. Use imagex tool to tranfer wim file onto your blank vhd.
imagex.exe /apply e:\win10\sources\install.wim 1 g:\ /verify

10. In “Administrator” mode, Type following command to make entry in the windows boot loader
c:\Windows\system32\bcdboot G:\Windows
Note: Replace “G” with the drive letter depending on you system where VHD is mounted.
11. Launch “msconfig.exe” from the “Administrator” command prompt to verify that new boot entry is added in the boot loader.
You can change the boot order from here.
Note: Replace “G” with the drive letter depending on you system where VHD is mounted
12. If you reboot the system, now you will have option to boot into new OS.








Wednesday, October 1, 2014

Unauthorized Access Exception - MvxLocationWatcher in Windows Phone 8

I have been working through Stuart Lodge's MvvmCross tutorial.  Session 12 is working with location watchers.  I was able to compile the solution but at run time I received the Unauthorized access error.

Solution:
1.) Solution Explorer
2.) Expand properties of the Windows Phone project
3.) Open WMAppManifest.xml
4.) Capabilities tab
5.) Select ID_CAP_LOCATION check box

The application must grant this permission in order to use the onboard location features.