Closed kztk-m closed 4 months ago
Hey @kztk-m,
Thanks for reporting the issue! Yeah it's an oversight, perhaps I should add some tests for the templates on the CI builds to avoid this in the future.
Howdy! I'm entirely new to this project and have hit this issue. For the sake of those like me, would someone be willing to share what usings are missing?
Ok, I realize now that the link in the original report shows all the possible missing using statements.
I had to add:
using System; // in Program.cs
using Eto.Forms;
using Eto.Drawing;
This problem seems there even when downgrading to Eto.Forms.Templates::2.8.0. I've downgraded to 2.7.5 now and use https://github.com/dotnet-outdated/dotnet-outdated to upgrade the packages.
Expected Behavior
Projects generated by
dotnet new etoapp
compile.Actual Behavior
dotnet build
fails due to the error "error CS0246: The type or namespace name 'Form' could not be found" inMainForm.cs
.It seems to me that this behavior is caused by 1c353b7, which removes some
using
s in favor of globalusing
. The commit also removed theusing
declarations from the template code, but it seems to me that neither the nuget nor the .csproj files in the template sets up globalusing
s for the code.To be clear, I was not troubled with making the generated compile itself; I can add
using Eto.Forms
and some otherusing
s in the generated .cs files to remove the errors.Steps to Reproduce the Problem
dotnet new install Eto.Forms.Templates
to install the latest template (2.8.2).mkdir SomeProj
andcd SomeProj
dotnet new etoapp
dotnet build SomeProj
, which fails with the above-mentioned error.Specifications