Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What reference do I need to include in order to make Cortana integration work? #7

Open
rfalanga opened this issue Sep 16, 2017 · 1 comment

Comments

@rfalanga
Copy link

I've just finished what I believe is module 79, integrating Cortana into a UWP app. It failed pretty badly. Following Bob Tabor's example, I put the following code into the constructor of the App class in App.xaml.cs:

public App()
{
 Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
  Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
  Microsoft.ApplicationInsights.WindowsCollectors.Session);
 this.InitializeComponent();
 this.Suspending += OnSuspending;
}

Visual Studio does not like that code at all! Especially it doesn't like the Microsoft.ApplicationInsights... I've got a red squiggly line under all three in the above code. What am I missing? My guess is a reference but I've no idea what the reference is.

@rfalanga
Copy link
Author

This is a follow-up, which I hope will bring to light more of what is going on with the problem I'm having with Microsoft.ApplicationInsights.

I tried again to figure out what's causing this error and found it generated the following:

CS0234 The type or namespace name 'ApplicationInsights' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

So I then tried to look for an assembly related to ApplicationInsights and I came across this one called Microsoft.VisualStudio.ApplicationInsights.Interfaces. I tried to include that, but it failed. So now I'm wondering if the failure to include Microsoft.VisualStudio.ApplicationInsights.Interfaces is because I'm using VS 2017? I'm guessing its a Core project and when Bob Tabor was doing these videos he was using VS 2015. So, I can't include Microsoft.VisualStudio.ApplicationInsights.Interfaces.

That takes me back to the error, "The type or namespace name 'ApplicationInsights' does not exist in the namespace 'Microsoft'". What is causing that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant