microsoft / Cognitive-Vision-Windows

Windows SDK for the Microsoft Computer Vision API, part of Cognitive Services
https://www.microsoft.com/cognitive-services/en-us/computer-vision-api
Other
166 stars 150 forks source link

FAILED to run the vision c# example #3

Closed margaretmz closed 7 years ago

margaretmz commented 8 years ago

From @khadijah111 on June 10, 2016 21:39

hello every body..

i followed the steps written here

https://www.microsoft.com/cognitive-services/en-us/computer-vision-api/documentation/getstarted/getstartedvisionapiforwindows

i downloaded the codes zip from gethups

1- the folder Sample-console not found

2- i tryied the examole inside SAMPLE.WPF and when tring to start the c# project, alot of errors generated like this:

Error CS0234 The type or namespace name 'ProjectOxford' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) VisionAPI-WPF-Samples C:\Users\khadijah\Documents\Visual Studio 2015\ProjectOxford-ClientSDK-CognitiveServices_1606\Vision\Windows\Sample-WPF\AnalyzeInDomainPage.xaml.cs 43 Active

do you have any idea please ..

thanks in advanced.

Copied from original issue: Microsoft/ProjectOxford-ClientSDK#73

margaretmz commented 8 years ago

From @cthrash on June 10, 2016 21:46

For the first issue, as you've discovered, this is a documentation bug. It should say Sample-WPF instead of Sample-Console. For the second issue, you'll need to make sure the NuGet packages are downloaded. If you're using Visual Studio 2015, you can right-click on the solution, and select "Restore NuGet Packages". Alternatively, you can run "Nuget.exe restore" from the command line.

margaretmz commented 8 years ago

From @khadijah111 on June 10, 2016 21:52

Thank you, yes i used 2015 , i tryed to restore NuGet packages, But the errors still appeared.!!!

margaretmz commented 8 years ago

From @cthrash on June 10, 2016 22:21

Can you go to Tools->NuGet Package Manager->Package Manager Console and try the following command: Update-Package -Reinstall ? That should force the packages to get downloaded again.

margaretmz commented 8 years ago

From @khadijah111 on June 10, 2016 22:31

thanks. yes i did. Now the errors decreased to 14 errors like:

CS0246 The type or namespace name 'SampleUserControlLibrary' could not be found (are you missing a using directive or an assembly reference?) VisionAPI-WPF-Samples C:\Users\khadijah\Documents\Visual Studio 2015\Vision\Windows\Sample-WPF\MainWindow.xaml

Because also in the solution explorer the (SampleUserControlLibrary) failed cannot be loaded

margaretmz commented 8 years ago

From @cthrash on June 10, 2016 22:35

Are you working with VisionAPI-WPF-Samples.sln (as opposed to VisionAPI-WPF-Samples.csproj)? The solution should automatically include the dependent SampleUserControlLibrary project.

margaretmz commented 8 years ago

From @khadijah111 on June 10, 2016 22:37

YES :) Now good. thank you .

margaretmz commented 8 years ago

From @khadijah111 on June 10, 2016 22:41

Thank you very much, you are save my time :+1:

cthrash commented 8 years ago

This issue appears to be resolved.

tmsd32 commented 8 years ago

This is definitely not resolved.

I have the same problem. I have also followed the instructions here

https://www.microsoft.com/cognitive-services/en-us/computer-vision-api/documentation/getstarted/getstartedvisionapiforwindows

and receive the following errors, even after following the steps in this thread.

The name "SampleScenarios" does not exist in the namespace "clr-namespace:SampleUserControlLibrary;assembly=SampleUserControlLibrary". VisionAPI-WPF-Samples C:\Users\smal\Documents\Visual Studio 2015\Projects\Cognitive-Vision-Windows-master\Sample-WPF\MainWindow.xaml

and

The tag 'SampleScenarios' does not exist in XML namespace 'clr-namespace:SampleUserControlLibrary;assembly=SampleUserControlLibrary'. Line 12 Position 10. VisionAPI-WPF-Samples C:\Users\smal\Documents\Visual Studio 2015\Projects\Cognitive-Vision-Windows-master\Sample-WPF\MainWindow.xaml

I have just bought a Windows PC after years of being a Mac exile to use the Microsoft Cognitive services, only to find that the official getting started instructions do not actually work. Not a great start.

Any suggestions?

Thanks in advance.

cthrash commented 8 years ago

The documentation was written prior to some code reorganization and zip-download method will not work. This is a result of refactoring common code in to a git submodule.

What you need to do instead is to clone this repo and the submodules via git clone --recursive https://github.com/Microsoft/Cognitive-Vision-Windows.git. Can you see if that solves your problem?

salikram commented 8 years ago

Hi all, I read and followed all the activity posted in above questions and answers but I could not solve my problem. I have 3 errors, one of them is: Error : The tag 'VideoResultControl' does not exist in XML namespace 'clr-namespace:SampleUserControlLibrary;assembly=SampleUserControlLibrary'. Line 28 Position 10. EmotionAPI-WPF-Samples In Solution Explorer, SampleUserControlLibrary (Load fail): that means no user controls libraries are loaded.

Thanks in advance.

cthrash commented 8 years ago

@salikram Is this a question for this repo, or for https://github.com/Microsoft/Cognitive-Emotion-Windows? The error shows EmotionAPI-WPF-Samples

salikram commented 8 years ago

Of course, the issue is from Emotion Api but error is similar.

cthrash commented 8 years ago

Did you get the sources via the .zip file or using git? What does the Output window say about the project not loading? Do you see the file VideoResultControl.xaml.cs on your machine?

salikram commented 8 years ago

I tried from both. The last line of output window is ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== Now, I saw and probably it is loaded but again I got another types of errors as follows.

  1. Error CS0246 The type or namespace name 'VideoAggregateRecognitionResult' could not be found (are you missing a using directive or an assembly reference?)
  2. Error CS0246 The type or namespace name 'Emotion' could not be found (are you missing a using directive or an assembly reference?)
    and so on.....
salikram commented 8 years ago

The problem is solved. I updated Microsoft.Project.Emotion and Newtonsoft.json references from visual studio then it worked well.

cthrash commented 7 years ago

I'm glad it worked out!

tadam98 commented 7 years ago

I have downloaded the latest from github https://github.com/Microsoft/Cognitive-Vision-Windows And I am getting an error that SampleUserControlLibrary is unavailable.

Error: The tag 'SampleScenarios' does not exist in XML namespace 'clr-namespace:SampleUserControlLibrary;assembly=SampleUserControlLibrary'. Line 8 Position 10.

Solution was compiled with VS2015 express. vs2015 version details 2017-02-26 compilation error

Any ideas on how to successfully complete the compilation of the sample code ? Thanks

chsienki commented 7 years ago

As mentioned above, you need to clone with submodules for it to build (git clone --recursive). If you've already cloned, you can grab the missing submodules by running the following in a git bash command prompt: git submodule update --init --recursive

If you downloaded via zip, then you'll need to grab the missing files manually. Grab the missing files from https://github.com/Microsoft/Cognitive-Common-Windows/ and put them in the Cognitive-Common-Windows directory.

tadam98 commented 7 years ago

I am on Windows 10 not Linux. Not sure how to run this command line script. Could you mail me the missing files or best,, create another zip that we can download ?

Can I run it from within VS2015 express ?

Best, Mickey

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Chris Sienkiewiczmailto:notifications@github.com Sent: Monday, February 27, 2017 07:55 To: Microsoft/Cognitive-Vision-Windowsmailto:Cognitive-Vision-Windows@noreply.github.com Cc: tadam98mailto:tadam_98@hotmail.com; Commentmailto:comment@noreply.github.com Subject: Re: [Microsoft/Cognitive-Vision-Windows] FAILED to run the vision c# example (#3)

As mentioned above, you need to clone with submodules for it to build (git clone --recursive). If you've already cloned, you can grab the missing submodules by running the following in a git bash command prompt: git submodule update --init --recursive

If you downloaded via zip, then you'll need to grab the missing files manually. Grab the missing files from https://github.com/Microsoft/Cognitive-Common-Windows/ and put them in the Cognitive-Common-Windows directory.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/Cognitive-Vision-Windows/issues/3#issuecomment-282634644, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AULBT8Z0ciFrHIQlvOPToKQlwW7mBIWlks5rgmVJgaJpZM4JGr_1.

tadam98 commented 7 years ago

I placed it under the correct tree. Not I am getting an error on line 33 of the .csproj file:

Vs2015 express is expecting “=” following the “data-pjax-transient” Error: The project file could not be loaded. '>' is an unexpected token. The expected token is '='. Line 33, position 91.

Best, Mickey Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Chris Sienkiewiczmailto:notifications@github.com Sent: Monday, February 27, 2017 07:55 To: Microsoft/Cognitive-Vision-Windowsmailto:Cognitive-Vision-Windows@noreply.github.com Cc: tadam98mailto:tadam_98@hotmail.com; Commentmailto:comment@noreply.github.com Subject: Re: [Microsoft/Cognitive-Vision-Windows] FAILED to run the vision c# example (#3)

As mentioned above, you need to clone with submodules for it to build (git clone --recursive). If you've already cloned, you can grab the missing submodules by running the following in a git bash command prompt: git submodule update --init --recursive

If you downloaded via zip, then you'll need to grab the missing files manually. Grab the missing files from https://github.com/Microsoft/Cognitive-Common-Windows/ and put them in the Cognitive-Common-Windows directory.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/Cognitive-Vision-Windows/issues/3#issuecomment-282634644, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AULBT8Z0ciFrHIQlvOPToKQlwW7mBIWlks5rgmVJgaJpZM4JGr_1.

tadam98 commented 7 years ago

HI,

I have installed the Github extension to Visual Studio and cloned the project recursively. Now it works well.

Best, Mickey

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Chris Sienkiewiczmailto:notifications@github.com Sent: Monday, February 27, 2017 07:55 To: Microsoft/Cognitive-Vision-Windowsmailto:Cognitive-Vision-Windows@noreply.github.com Cc: tadam98mailto:tadam_98@hotmail.com; Commentmailto:comment@noreply.github.com Subject: Re: [Microsoft/Cognitive-Vision-Windows] FAILED to run the vision c# example (#3)

As mentioned above, you need to clone with submodules for it to build (git clone --recursive). If you've already cloned, you can grab the missing submodules by running the following in a git bash command prompt: git submodule update --init --recursive

If you downloaded via zip, then you'll need to grab the missing files manually. Grab the missing files from https://github.com/Microsoft/Cognitive-Common-Windows/ and put them in the Cognitive-Common-Windows directory.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/Cognitive-Vision-Windows/issues/3#issuecomment-282634644, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AULBT8Z0ciFrHIQlvOPToKQlwW7mBIWlks5rgmVJgaJpZM4JGr_1.