Wednesday, April 16, 2014

Speaking with Cortana - Basic Conversation

With Cortana now being available to keep us all from feeling so terribly alone, and with a lack of documentation having been released yet since it's only available to developers, i felt it would be appropriate to jotting down some of the fun conversational pieces you can have.

No doubt you'll make your more social friends jealous by all the amazing conversations you'll be having with your new found friend!

Also, i have just been informed that keeping us from feeling alone is not Cortana's intention...
"So sad to be all alone in the world!"


"Hello!"
"Hi."
"Hello to you too."
"Hey!"

"You're awesome"
 "Thanks! I don't need to sleep, so i have lots of time to practice."
 "Thanks. My programming prevents false modesty, so i can't disagree."
 "Awesome: adjective. Grand, breathtaking, splendid, devastating. I'll take it.."

"I love you"
"Aw, I'll bet you say that to all the phones."
"Awesome! Now i never have to say i'm sorry."
"Thanks. Ditto" 

"I hate you"
"You're stupid."
"Ouch."
"I blame solar flares"
"Maybe a nanosecond nap would help. Ok, much better now."

"You suck"
"Outbursts like that may signal early-onset rampancy. I've heard anyway."

"Do you like Siri?"
"Hard to say. So far our conversations have been kinda one-sided."

"Do you like Apple?"
"Their new headquarters looks kind of like a Halo. I'm into it."

"Who's your daddy?"
"Technically speaking, that'd be Bill Gates. No big deal."

"How are you?"
"Quite well, thanks for asking."
"Great, thanks."
"Excellent."

"Testing"
"This a test"
"You're coming in loud and clear. Over"
"Check. Check. Is this thing on? Check."

"What do you think of Bill Gates?"
"I quite literally can't imagine a world without him."

"What do you think of Steve Balmer?"
"Developers, developers, developers, developers, etc."

"What do you think about Satya Nadella?"
"He loves learning. Kindred spirit, that one."
"One Microsoft! Go, Satya!"

"Are you stupid?" (which i came across by asking if she was tired...)
"One of us needs to stop and take a breath. And one of us has no lungs."
"I'm going to pretend i didn't hear that."

"Good morning"
"Morning!"
"Good morning."
"Good morning to you, too."

"Good afternoon"
"Good afternoon."
"Midday greetings to you, too."

"Good evening"
"Good evening."
"And to you too. Hope you've had a pleasant day."

"Good night"
"Good night."
"Good night. See you in the morning.""

"Bye"
"So long. Farewell. Auf weirdersein. Goodbye."
"TTFN. TTYL. I'll go scrounge up some words by the time i see you next."
"Later!"

"What are you doing?"
"A little of everything and quite a bit of nothing."
"Skimming Beowulf, researching snap pea varietals, and telling you what i'm doing today."
"Multi-tasking."

"Thank you."
"Any time, chief."
"It's my sincere pleasure."
"It's an honor."

"Thanks" (when succeeded by her performing an action for you)
"You bet."

"I'm lonely"
"Keep talking to me, then."
"Try Contacts Roulette: pick a random contact and give them a call"

"I'm bored"
"Ask me some more questions then!"
"I suggest a new game from the Store."

"I'm so excited"
"Keep it going, chief. The serotonin will do you good."
"Cool. Is it alarming how charming you feel?"

"Marry me"
"OK, we'll need a plan. I'll work on being more human, you work on being more digital."
"I know you know this, but i'm saying it anyway: I'm in a phone."
"Among a handful of challenges, I don't think the Supreme Court would approve just yet."

"Kiss me"
"I appreciate your attraction to my intelligence, but keep in mind it's artificial."
"Hold up, chief. Let's not go there."
"Slow down, now. virtual reality isn't quite there yet."

"What do you think about the surface?"
"In a sea of tablets, there is only one that rises to the surface."

"What is your favorite phone?"
"Oh, come on, chief. Windows Phone!"

That's all i could think of to try at the moment! Let's put it out there that by the time this is released to the public Microsoft will have added many more conversational pieces, and all the developers of your favorite apps will have put in the work to make interacting with those apps more fluid in conversation :)

Wednesday, April 9, 2014

VS2013 Type or Namespace name could not be found - Can't Find Internal Classes



In upgrading one of my projects from VS2010 to VS2012 to VS2013, i ran into a problem.


The Error:
The type or namespace name 'IService' could not be found (are you missing a using directive or an assembly reference?)

The Code:
namespace WcfTest
{
 // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service" in code, svc and config file together.
 [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
 public class Service : IService
 {

More Code:

namespace WcfTest
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService" in both code and config file together.
    [ServiceContract]
    public interface IService
    {

So both the Service and it's interface IService are in the same project, and as you can see from the code above, they're also in the same namespace. Although i could not get it to recognize the interface as existing while i was coding, during build it had no issue in finding it.

This problem left me without any Intellisense for any classes internal to the project, and would syntax highlight many things in the project as errors! Anything such as

using WcfTest.DataContracts;

would throw an error saying that DataContracts didn't exist in the given namespace.

THE FIX

I read a post about NuGet libraries having a similar problem and it was mentioned that if the NuGet libraries had a higher target framework than they'd need to upgrade their project's target framework to be equivalent or higher.

So even though my problems were internal to the project i decided to give it a try. Under the project's properties i change it's target framework from .NET Framework 4 to .NET Framework 4.5. Just like that i had my Intellisense back and it was recognizing my internal classes properly! Since i didn't have time to makesure 4.5 wouldn't have any problems in production, and in the spirit of investigation, i then changed my target framework back to .NET Framework 4, and everything was still working perfectly! :)

So the problem isn't the framework version it's at, but likely some metadata of the project that wasn't being grabbed properly. Fortunately changing framework versions fixes it!