Search Results For : visual studio

Xamarin Warning – Could not find android.jar for API Level 25

When i attempted to build my solution, i received this error.

Could not find android.jar for API Level 25. This means the Android SDK platform for API Level 25 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager…), or change your Xamarin.Android project to target an API version that is installed. (C:\Program Files (x86)\Android\android-sdk\platforms\android-25\android.jar missing.)

You can go into C:\Program Files (x86)\Android\android-sdk and run SDK Manager in administrator mode and find the corresponding version and enable it.

Rebuild your solution and it will work

Xamarin Warning- TargetFrameworkVersion error (need to increase TargetFrameworkVersion) for your project

I was doing Xamarin and i got this error –

The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.

I went into “C:\Program Files (x86)\Android\android-sdk” and run SDK Manager.exe as manager and do an install and update.

Rebuild the solution in Visual Studio and it will work

Visual Studio Nuget Error Install-Package : The current environment doesn’t have a solution open.

I was attempting to open a solution that I downloaded from Github and I received this error.

Install-Package : The current environment doesn’t have a solution open.

For those of us who met this error, You just have to go to File select Save All in Visual Studio to save the solution somewhere and the problem will be gone.

Using Toggle Control to disable/enable idle detection – Windows Phone 7

Saw a question on Dream Build Launch on how can one use toggle control to disable / enable idle detection and from there, enable/disable it idle detection accordingly.

I believe he needed it in his setting page. Did up a quick demo.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Resources
1. I used the toggle control from the silverlight toolkit for Windows Phone on codeplex (Can be found here : http://silverlight.codeplex.com/releases/view/75888) for the toggle control.

2. Do read this msdn article for

Things I did
1. Added the toggle controls in the toolkit into Visual Studio (if you have yet to do so)
2. Pull in the toggle controls and attached the checked event handler onto the control.
3. Add the following code (I included the method signature here).

private void toggleSwitch1_Checked(object sender, RoutedEventArgs e)
{

if (toggleSwitch1.IsChecked == true)
PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled;
else
PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Enabled;
}

You can download the demo file here : https://skydrive.live.com/redir?resid=29F099C37B76CA59!2752&authkey=!AOBimFuXpsh6oog

Missing sln from solution explorer in Visual Studio

Recently, i had a very interesting problem with my colleague, we were unable to see the sln file in his Visual Studio 2010’s Solution Explorer. He was unable to add another project into the solution. We tried to open and close the solutions and alot different ways….

Missing sln file in Solution Explorer - 1

Missing sln file in Solution Explorer - 1

Apparently, what we have to do is just to go into Tools > Options in Visual Studio and go into Projects and Solutions and select General. There is an option called “Always show solution“. Check it and save and you will see your solution file!

Missing sln file in Solution Explorer - 2

Missing sln file in Solution Explorer - 2

Missing sln file in Solution Explorer - 3

Missing sln file in Solution Explorer - 3

If you have any questions, feel free to contact me via the contact form, comment or email me at guohong@limguohong.com

Do check out the tutorial page too!