Trouble with DeviceNetworkInformation class - windows-phone-7

Good morning,
I have to use the properties from DeviceNetworkInformation in my application.
(http://msdn.microsoft.com/en-us/library/microsoft.phone.net.networkinformation.devicenetworkinformation(v=vs.92).aspx)
I've already add the following line to my code
using Microsoft.Phone.Net.NetworkInformation;
but when I try to use DeviceNetworkInformation, I got the following error:
The name "DeviceNetworkInformation" doesn't exist in current context.
I just don't know what to do.
Thank you all.

It's only available for the Windows Phone 7.1 SDK (or newer). You probably made a 7.0 application.

Related

Visual studio complains about spatial types

I have these CLR types installed on my local https://puu.sh/yEWG5/b4f77fba7b.png
Also, I have SQL server 2016 installed on my local system but when I try to run the project I get error as below
https://puu.sh/yEWQm/78a4220830.png
Can someone help? I tried installing latest nugget package from https://www.nuget.org/packages/Microsoft.SqlServer.Types/ but it did not help.
Though I am able to add a column of type geography in a table in my local database. It fails at runtime when I run my project and error comes as below
https://puu.sh/yEWQm/78a4220830.png
According to the docs if you have installed the CLR Types it should load from the GAC so I'm not sure why that didn't work for you. (I would check that you have the correct version as your dependency)
However, we do use the SQLServerTypes in our app without installing the CLR types by using the following method (this method is described in the readme.htm that comes with SqlServerTypes).
Grab the SqlServerTypes.nupkg and extract it to a folder lets call this folder SST from now on.
(Locations of the files I talk about in the following steps may differ from version to version but, the principle is the same)
Create a SqlServerTypes folder in your project
Copy the SST/nativebinaries/x86 and x64 folders into your new SqlServerTypes folder
Also copy the files from SST/content (you should see Loader.cs and readme.htm) into the SqlServerTypes folder.
Now all you need to do is call the Loader when your app boots up.
We do this during our autofac setup by making this call.
Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory)
You may need to adjust the param passed into this method to work with your application. If the correct path is used you should have access to the spatial types in your code.
edit: It may be possible to just call the LoadNativeAssemblies straight away (and avoid all the work I posted above) if you have installed the nuget package in your app but, I have not tested this as we are stuck on an old version of SqlServerTypes.
Because i cannot put a comment i have to put a answer, you can check that, that article and this, this, this and this answers, i hope they guide you to someting usefull.

HttpUtility.ParseQueryString Mono 4.8 Xamarin Mac Upgrade Issue

I have an app I have been working on that was running fine.
I upgraded to the latest Xamarin with mac support and now I get an error when I try to use HttpUtility.ParseQueryString.
I have an App.config file and it is telling me that it can't parse it, but this happens when trying to call ParseQueryString. How are those 2 related?
I thought I had found the problem because my app also has a ServiceReferences.ClientConfig file for http client settings. I copied my App.config section to the ServiceReferences.ClientConfig file and that fixed it until I went to show my fellow dev the new error.
The new error was saying something about Path.Combine path1 being null.
I looked up that error and found a reference to a page talking about MacSupport in xamarin here: https://searchcode.com/codesearch/view/8556026/
I don't know if they are related, but that is the closest I found to the stack trace I was seeing.
Can anyone tell me what changed in Mono 4.8 for Mac in Xamarin that would cause an issue with HttpUtility.ParseQueryString and how to solve it?
System.Configuration is a common point of pain during mono upgrades, as it's behavior sometimes subtly (or not so subtly) changes.
You'll need to post a much larger chunk of information here for anyone to be able to help you.
Or you could post on the XM Forms or file a bug if you believe this is a bug, as those are a more appropriate place for such reports.

Upgrading existing applications manually MobileFirst Platform Foundation 7.1

I have followed the the instructions from Upgrading existing application manually
Its says :
If you are using the latest interim fix for IBM MobileFirst Platform
Foundation, link the IBMMobileFirstPlatformFoundation.framework and
"openssl.framework" files
My question is :
I cant find openssl.framework in Xcode 7.1. How to get this? (Does it obtain from this link?)
Why Worklight 7.1 need this?
Our Worklight version is : 7.1.0.00-20151107-1647
I am not sure those instructions are correct; see the instructions in the following tutorial: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/hello-world/configuring-a-native-ios-application-with-the-mfp-sdk/#addingNativeSDK
openssl.framework is not mentioned
I would change from manually setting it up to the new approach of using CocoaPods; going forward that is the only way to add the MFP framework.
It is inside the Framework folder. When i created the projects, the following files are added to Framework folder:
IBMMobileFirstPlatformFoundationHybrid.framework
IBMMobileFirstPlatformFoundationJSONStore.framework
openssl.framework
SQLCipher.framework
You might need to manually drag and drop those files.

Integrateing openfeint in xcode using unity3d

I want to make an openfeint leaderboard in xcode using Unity3d.
I am using Unity 3.2 and openfeint 2.9.1.
I have built correctly as well as what they told in openfeint Unity support readme.txt and open feint web link.
But I'm getting error like
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1
What am I doing wrong?
I'm working with ios 4.2.
I have tried and corrected well all unity player settings and set the target ios platform from 3.0 to 3.2 but I am getting the same error.
Can any one point out what am doing wrong.?
Thank you.
The solution is easy but took time as it happens :)
In Editor\OpenFeint\XCode\Appcontroller+OpenFeint.mm You must remove UnitySetAudioSessionActive() in the methods dashboardDidDisappear() and dashboardWillDisappear().
And everything becomes OK. Don't understand why it is there at all when UnityPause() is there?
UPDATED: You must remove UnitySetAudioSessionActive() ONLY in the methods dashboardWillAppear() and dashboardDidDisappear() (or sound will stop playing after disabling device there...
by that I thought you will get out from your OpenFeint Problem ..
Vivek Shah

Add reference failing C#

I have a wcf service running and I was trying to implement a tcp model on it so I made a windows service and tried adding the WCF service as a reference to it which worked fine. But when i tried to build the windows service it gave me an error as "The type or namespace name '*' could not be found (are you missing a using directive or an assembly reference?)". In fact I tried to add my dal project as reference and the same error cropped up. I implemented a POC just to check if I am doing things correctly which worked fine. But it fails on my solution am I missing some configuration thing I am confused please help thanks.
It is important that you document the type name that it complains about to get a good answer. Avoid targeting the .NET client profile whenever you do something webby. System.Web.dll is not part of it.
Project + Properties, Application tab, Target framework combo.
Thank's for all the help guys I got the reason why it was failing all my other projects are having target framework as .Net Framework 4. But each time I add a new project to my solution they are been targeted to .Net Framework 4 Client Profile. Which I changed and everything worked fine. Thank's again for the help.

Resources