I've heard nice stuff about the NavigateToString() C# method, but i can't seem to be able to use it =(
I have a System.Windows.Forms.WebBrowser in a panel, and when i try to call NavigateToString() it says:
"Error: 'System.Windows.Forms.WebBrowser' does not contain a definition for 'NavigateToString' and no extension method 'NavigateToString' accepting a first argument of type 'System.Windows.Forms.WebBrowser' could be found (are you missing a using directive or an assembly reference?)
C:\Users\Name\documents\visual studio 2010\Projects\TestPHPNavigateToString\TestPHPNavigateToString\Form1.cs TestPHPNavigateToString"
I didn't find anyone with the same issue oO, is there a particular dll i should add a reference to?.
I have vs2010 with .Net FrameWork 4.0, i just reinstalled it just to be sure, but it feels like I'm missing something here =o
Thanks.
The method NavigateToString is available on System.Windows.Controls.WebBrowser and not System.Windows.Forms.WebBrowser
http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.navigatetostring.aspx
-> PresentationFramework (in PresentationFramework.dll)
Do you have this reference?
Related
I am using CefSharp WinForms in my project and i cannot get it to execute a JS script from the CefSharp Browser Control
(I was to navigate to URLs though - so most of the CEF functionality works)
I tried following the tutorial at: https://github.com/cefsharp/CefSharp/search?utf8=%E2%9C%93&q=BoundObject
I am using the following namespaces:
using CefSharp.WinForms;
using CefSharp.Internals;
and added references to the following assemblies (x64):
CefSharp.WinForms.dll
CefSharp.dll
CefSharp.Core.dll
but still I get the following error when I try to use one of the functions:
ExecuteScriptAsync or EvaluateScriptAsync
I get the following error:
'CefSharp.WinForms.ChromiumWebBrowser' does not contain a definition for 'EvaluateScriptAsync' and no extension method 'EvaluateScriptAsync' accepting a first argument of type 'CefSharp.WinForms.ChromiumWebBrowser' could be found (are you missing a using directive or an assembly reference?)
'CefSharp.WinForms.ChromiumWebBrowser' does not contain a definition for 'ExecuteScriptAsync' and no extension method 'ExecuteScriptAsync' accepting a first argument of type 'CefSharp.WinForms.ChromiumWebBrowser' could be found (are you missing a using directive or an assembly reference?)
can anyone direct me to the point i am missing? is there another API? maybe some reference dll that I am missing?
thanks
You may be missing one other namespace. I would suggest you add:
using CefSharp;
We were having the same trouble and found that we were simply missing this one.
We now have:
using System.Text;
using CefSharp;
using CefSharp.WinForms;
using CefSharp.Internals;
CaptainBli is correct: you have to use "using CefSharp"
Probably you didn't expect it there, since it seems to be in another namespace: "CefSharp.WinForms.ChromiumWebBrowser".
This is because EvaluateScriptAsync and ExecuteScriptAsync are extension methods
I just installed Visual Studio 2012 so I could take advantage of better ways to implement MVVM with Silverlight.
The first thing I wanted to do is start using the [CallerMemberName] attribute so I didn't have to hard-code property name strings.
I created a new Silverlight app, created a new class, included 'using System.Runtime.CompilerServices', and proceeded to type [CallerMemberName]. However, I get the error:
"The type or namespace name 'CallerMemberNameAttribute' could not be found (are you missing a using directive or an assembly reference?)"
However, I did include the using directive and there are no other assemblies that need to be referenced.
This is driving me up the wall since no Google search returned any information about why I might not be able to use it in VS2012/Silverlight. How do I fix this?
It looks like the version of Silverlight you're targetting doesn't include that attribute.
However, that's OK; you can simply define it yourself:
namespace System.Runtime.CompilerServices {
sealed class CallerMemberNameAttribute : Attribute { }
}
I want to use a third party control (dll) in a Winforms application. I can integrate the control into the toolbox and then drag and drop it to a windows form. That all works. But during the compilation I get the error message:
The type or namespace name '....' could not be found (are you missing a using directive or an assembly reference?)
The library is also seen below references (solution explorer). But a corresponding "using statement" is missing. I am also not able to add a using... manually. The Intellisence doesn't provide me the missing item. So what is wrong here?
I am 99% sure that the Target Framework of your project is set to .net framework client profile. change it and all will be good.
I am building an application which requires accessing Dropbox. Since there is no api for windows phone yet, i am using the ReactiveOAuth to achieve this.
I was referring to this tutorial, http://blogs.developpeur.org/kookiz/archive/2011/11/13/wp7-upload-a-file-to-dropbox-using-reactiveoauth-wp7.aspx.
I have followed all the steps, but VS shows an error saying
Error 1 'DropBoxTest.MainPage' does not contain a definition for
'RequestToken' and no extension method 'RequestToken' accepting a
first argument of type 'DropBoxTest.MainPage' could be found (are you
missing a using directive or an assembly reference?)
I have added all the mentioned classes and references. Could anyone please have a look and help?
You should take a look to Spring.NET Dropbox.
It supports WP7 and provides a sample too.
http://www.springframework.net/social-dropbox/
I've already wasted a few hours on this one:
XmlSerializer serializer;
YES, the using is there, the reference is there, I made the entire solution in VS2010 using .NET 4.0 so it's not any of those things. If I go in Object Explorer I can find the XmlSerializer class I want in the correct namespace but if I try typing the above line in to my code file and compiling I get the dreaded
The type or namespace name 'XmlSerializer' could not be found (are you missing a using directive or an assembly reference?)
warning of death. I don't get it on IntelliSense either. All other threads/websites I've looked on have come up blank or with one of the solutions I've already ruled out. What am I missing?
Cheers
Do you build a Silverlight app?
Silverlight has XmlSerializer defined inside System.Xml.Serialization.dll assembly which is not referenced by default.
This often leads to confusion because other framework versions have it defined in System.Xml.dll.
You need to add System.Xml.Serialization.dll to project references to wire it up.
I had the same problem.
Go to Object Explorer, select XmlSerializer and choose copy. Then, paste into code
This helped me with some weird reason (no there wasn't a typo or anything like that).