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

Namespace can't be found from Preview in Visual Studio Mac #9

Open
luksal opened this issue Jan 31, 2019 · 1 comment
Open

Namespace can't be found from Preview in Visual Studio Mac #9

luksal opened this issue Jan 31, 2019 · 1 comment

Comments

@luksal
Copy link

luksal commented Jan 31, 2019

Eto Forms Preview in Visual Studio Mac is not able to load classes from the same project, without getting a compile error.

Steps to Reproduce the Problem

  1. Create project using "dotnet new etoapp -sln -s -xm -m preview"
  2. Create class in subnamespace
  3. Import namespace and instantiate class
  4. Preview Crashes and can not display the content of the form

Code that Demonstrates the Problem

using System;
using Eto.Forms;
using Eto.Drawing;
using TestApp.Model;

namespace TestApp
{
	partial class MainForm : Form
	{
        TestObj t;


        void InitializeComponent()
		{
			Title = "My Eto Form";
			ClientSize = new Size(400, 350);
			Padding = 10;

			t = new TestObj();

		}
	}
}
using System;
using Eto.Forms;
using Eto.Drawing;
using TestApp.Model;

namespace TestApp
{
	public partial class MainForm : Form
	{
		public MainForm()
		{
			InitializeComponent();
		}
	}
}
using System;

namespace TestApp.Model
{
	public class TestObj
	{
		
	}
}

Specifications

  • Version: 2.4.1.1 and current development build
  • Platform(s): Visual Studio Mac
  • Operating System(s): macOS 10.14
@cwensley
Copy link
Member

cwensley commented Feb 1, 2019

Yes, this is a known limitation unfortunately. You need to put any custom code into the code behind (MyForm.cs vs. MyForm.eto.cs)

@cwensley cwensley transferred this issue from picoe/Eto May 12, 2022
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

2 participants