dnikolovv / devadventures-net-core-template

A Visual Studio extension that provides a robust and maintainable setup for a .NET Core API.
34 stars 2 forks source link

Error when creating new solution from the template #2

Closed luedi closed 6 years ago

luedi commented 6 years ago

I just tried to create a new solution from your template and got the following error:

devenv_2018-08-25_13-50-37

After closing the message box i see an error in Business test Project:

image

I tried to build the solution, but i got a bunch of compile Errors (283 to be precise). Next i fixed the broken project reference in the test project. When i have done this some errors remains:

image

I took a look at the solution with the Windows Explorer and noticed that the folder configuration and the file stylecop.json is missing. After removing the references to stylecop.json in the projects i could successfully compile the solution.

dnikolovv commented 6 years ago

Hm... I seem to be unable to reproduce this.

I also asked a few friends to try and it worked straight out of the box for them.

It seems to me that this may be a Windows path length issue. Consider using a shorter root path for the project (ex. C:\Test). Also make sure that you're running the latest version (1.3) of the extension.

luedi commented 6 years ago

I have investigated the problem further. First i thought it maybe occurs because i use the Resharper extension, which does heavy code analysis. But this is not the case. Also if i disable it, the problem occurs.

If i start a new instance of Visual studio (i'm using 15.8.1 Community) i can create a new solution from the template successfully. But every subsequent create will fail until i close VS and reopen it again. This behavoir is perfectly reproducable. I'm using a short path as you suggested (F:\Test) and also a short solution name. Even if i create a new blank solution and add a new project using the template the errors will occur.

Also the file layout seems to be broken. Take a look at the Directory structure below. The "Test" Folder is a successfully created solution. The "Test1" Folder is a broken solution:

image

If you need any further information, let me know.

dnikolovv commented 6 years ago

Thank you! I will be reviewing this bug and update you when it's fixed.

dnikolovv commented 6 years ago

Hey,

I tried to reproduce the issue again, but unfortunately I'm unable to.

image

I made 5 subsequent projects and all were generated successfully. (using VS 15.8.1 Professional)

When I have some more free time available I'll clean up and open source the extension code itself. That will enable you to debug it on your system. Until then, I'm not sure if there's anything we can do.

Thank you

dnikolovv commented 5 years ago

@luedi Hey! I've open sourced the extension code. You can debug it locally if you want.

luedi commented 5 years ago

Good news... I never created an extension. It would be nice if you could provide a short description on how to setup the solution (e.g what prerequisites have to be instlled).

Regards Klaus

luedi commented 5 years ago

Just tried the latest version of your extension in VS 2018.9 Preview 3. The bug seems to be fixed, got no errors and the solution is created as expected.

Regards Klaus