|
Rank: Member Groups: Member
Joined: 11/7/2008 Posts: 16
|
Here are my steps to get errors:
1.) Open VS2010 and create a new 'Windows Forms Application' using '.NET Framework 4' in C#.
2.) Click on Toolbox and drag 'WebControl' from EO.WebBrowser.WinForm (already exists from installation) to Form1
3.) Click 'Start Debugging'
How would you suggest I fix this?
Here are the errors:
Error 1 The type or namespace name 'EO' could not be found (are you missing a using directive or an assembly reference?) c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication9\WindowsFormsApplication9\Form1.Designer.cs 64 17 WindowsFormsApplication9
Error 2 The type or namespace name 'EO' could not be found (are you missing a using directive or an assembly reference?) c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication9\WindowsFormsApplication9\Form1.Designer.cs 65 17 WindowsFormsApplication9
Warning 3 The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "EO.WebBrowser.WinForm" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. WindowsFormsApplication9
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, Please see here for more details: http://www.essentialobjects.com/doc/6/start/winform.aspxLook for "Using with .NET Framework Client Profile". Thanks!
|
|
Rank: Member Groups: Member
Joined: 11/7/2008 Posts: 16
|
Did as you said, here is my code. I now get 6 errors:
Error 1 The type or namespace name 'WebView' could not be found (are you missing a using directive or an assembly reference?) c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication11\WindowsFormsApplication11\Form1.cs 17 17 WindowsFormsApplication11
Error 2 The type or namespace name 'WebView' could not be found (are you missing a using directive or an assembly reference?) c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication11\WindowsFormsApplication11\Form1.cs 34 16 WindowsFormsApplication11
Error 3 The type or namespace name 'WebView' does not exist in the namespace 'EO.WebBrowser' (are you missing an assembly reference?) c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication11\WindowsFormsApplication11\Form1.Designer.cs 66 31 WindowsFormsApplication11
Warning 4 The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "EO.WebBrowser.WinForm" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. WindowsFormsApplication11
Error 5 'EO.WebBrowser.WinForm.WebControl.WebView' is a 'property' but is used like a 'type' c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication11\WindowsFormsApplication11\Form1.cs 17 17 WindowsFormsApplication11
Error 6 'EO.WebBrowser.WinForm.WebControl.WebView' is a 'property' but is used like a 'type' c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication11\WindowsFormsApplication11\Form1.cs 34 16 WindowsFormsApplication11
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using EO.WebBrowser;
namespace EO.WebBrowser.WinForm { public class WebControl : Control { private WebView m_WebView;
public WebControl() { SetStyle(ControlStyles.UserPaint, true); Width = 250; Height = 250; this.BackColor = Color.White; }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (m_WebView != null) m_WebView.Create(Handle); }
public WebView WebView { get { return m_WebView; } set { m_WebView = value; } } } }
namespace WindowsFormsApplication11 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void Form1_Load(object sender, EventArgs e) {
} } }
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
You need to remove the reference to System.Design.dll and EO.WebBrowser.WinForm.dll from your project. That's what this additional code is for ---- so that your project won't need those two DLLs.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 11/7/2008 Posts: 16
|
Still not working.
Here are my steps
1.) Open VS2010 and create a new 'Windows Forms Application' using '.NET Framework 4' in C#.
2.) Paste code below into Form1.cs
3.) Click 'Start Debugging'
I get these errors:
Error 1 The type or namespace name 'WebView' could not be found (are you missing a using directive or an assembly reference?) c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication13\WindowsFormsApplication13\Form1.cs 15 17 WindowsFormsApplication13
Error 2 The type or namespace name 'WebView' could not be found (are you missing a using directive or an assembly reference?) c:\users\da4ee\documents\visual studio 2010\Projects\WindowsFormsApplication13\WindowsFormsApplication13\Form1.cs 32 16 WindowsFormsApplication13
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using EO.WebBrowser;
namespace EO.WebBrowser.WinForm { public class WebControl : Control { private WebView m_WebView;
public WebControl() { SetStyle(ControlStyles.UserPaint, true); Width = 250; Height = 250; this.BackColor = Color.White; }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (m_WebView != null) m_WebView.Create(Handle); }
public WebView WebView { get { return m_WebView; } set { m_WebView = value; } } } }
namespace WindowsFormsApplication13 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void Form1_Load(object sender, EventArgs e) {
} } }
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Did you reference EO.WebBrowser.dll?
|
|
Rank: Member Groups: Member
Joined: 11/7/2008 Posts: 16
|
It's now working... thanks for the quick responses!!!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
You are welcome. Please feel free to let us know if there is anything else.
Thanks!
|
|