CleanArchitectureCodeGenerator icon indicating copy to clipboard operation
CleanArchitectureCodeGenerator copied to clipboard

HRESULT E_FAIL

Open jessiepcmetals opened this issue 3 years ago • 13 comments

Hi @neozhu, After updating my VS 2022 to version 17.2.2 image

I'm getting this error.

image

Any help how to fix this?

jessiepcmetals avatar May 30 '22 19:05 jessiepcmetals

You can try to debug it yourself and see what's wrong. It could be the field type of the defined entity class or some other problem

neozhu avatar May 31 '22 01:05 neozhu

Getting the same issue. Can't find out why. No idea if I'm doing anything wrong or if something broke

Foxlider avatar Oct 09 '22 09:10 Foxlider

check your entity class properties type .

neozhu avatar Oct 09 '22 09:10 neozhu

It's from a clean repo. Just did a new app, added a class like so

public class Author : AuditableEntity
{
    public ulong AuthorID { get; set; }
    public string? Name { get; set; }
    public string? URL { get; set; }
}

and I get a COM error

EDIT : I get the error even with a new project from template without adding anything

Foxlider avatar Oct 09 '22 09:10 Foxlider

maybe you can debug it. I am working in my vs.net 2022

neozhu avatar Oct 09 '22 09:10 neozhu

No idea on how to do that. Am using VS 2022 Preview tho

Foxlider avatar Oct 09 '22 13:10 Foxlider

the project name I was hard code, or you can fork "https://github.com/neozhu/CleanArchitectureWithBlazorServer" project for testing it. is okay. this is blazor project so you need to build from blazor branch code

neozhu avatar Oct 10 '22 00:10 neozhu

getting the same error on VS2022 community 17.3.6

TurgayTurk avatar Oct 20 '22 13:10 TurgayTurk

https://user-images.githubusercontent.com/1549611/197116874-f28414ca-7fc1-463a-b887-0754a5bb3e01.mp4

I am working

neozhu avatar Oct 21 '22 05:10 neozhu

thanks for video. Thats exactly how I have tried it. But maybe either the community edition or Win11 is cousing that error and I cant find any workarround.

TurgayTurk avatar Oct 21 '22 08:10 TurgayTurk

2022.mp4 I am working

Just re-compile Codegenerator from Source and re install it from release folder!

1)remove old COM E_FAIL CleanArchitectureCodeGenerator version from VS extention

2)download and update all CleanArchitectureCodeGenerator nu-packages

3)install compiled release version of updated CleanArchitectureCodeGenerator Now it's working! )

neozhu thanks for your project!

Codegenerator forgets to add or adds incorrectly names of some fields and objects. but i successfully corrected it manually.

I can't get access to the generated page (( auth problem access to generated razor page (( Message: "You are not authorized to be here. For more information, contact your system administrator."

I think it because OnInitializedAsync() method is not called when generated razor pages are loaded. I don;t understand why OnInitializedAsync() not colled on generated razor page((

Last: it would be cool to add the MAUI Blazor Hybrid Project to this solution))

PS: Used platform -> Windows 11 22H2 \ VS 22 Professional x64 17.4.2

jurikja avatar Dec 08 '22 17:12 jurikja

image you should be set permissions for the admin role then need re-login it

neozhu avatar Dec 09 '22 00:12 neozhu

you need run add-migration project and update-database to generate table in entityframework code-first model

neozhu avatar Dec 10 '22 23:12 neozhu