Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Template 10 Error during setup Application Insight does not exist in Namespace

I have followed the instruction to get the Template 10 up and running but I am running into a single assembly error CS0234

Error CS0234 The type or namespace name 'ApplicationInsights' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) WindowsApp1 C:\Users\Keshi\AppData\Local\Temporary Projects\WindowsApp1\App.xaml.cs

Any idea's why this assembly is missing. I have installed the entire VS package. Why would this assembly be missing.

        Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
        Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
        Microsoft.ApplicationInsights.WindowsCollectors.Session);

Thank you

like image 521
user3363744 Avatar asked Mar 06 '16 20:03

user3363744


1 Answers

I had to add a few lines to the project.json file to solve this. I believe the lines I added were (in dependencies):

"Microsoft.ApplicationInsights": "1.0.0", 
"Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0", 
"Microsoft.ApplicationInsights.WindowsApps": "1.0.0", 

My full project.json file looks like:

{
  "dependencies": {
    "Microsoft.ApplicationInsights": "1.0.0", 
    "Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0", 
    "Microsoft.ApplicationInsights.WindowsApps": "1.0.0", 
    "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", 
    "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
    "Microsoft.Xaml.Behaviors.Uwp.Managed": "1.0.3",
    "Newtonsoft.Json": "8.0.2",
    "Template10": "1.1.*"
  },
  "frameworks": {
    "uap10.0": {}
  },
  "runtimes": {
    "win10-arm": {},
    "win10-arm-aot": {},
    "win10-x86": {},
    "win10-x86-aot": {},
    "win10-x64": {},
    "win10-x64-aot": {}
  }
}

And I can build and run the hamburger menu project (it's just the blank template as I'm just getting started).

like image 196
CodingGorilla Avatar answered Oct 02 '22 14:10

CodingGorilla