Open GadgetGeekUK opened 1 year ago
The project templates used to create OC app / module without source code dependency
I realize that, hence why the generated project references the nuget version of OrchardCMS. However, I did not expect the error shown if module generation is used to create a new module within a fork of the source code. Its also a strange error, I'd have thought you could have used and built the generated module successfully once the code has been initially generated...
Can the module generation logic be clever to detect we are in OC's source code? Maybe by checking for the existing .Target/.Props files?
Describe the bug
Error on build (Visual Studio 2022 - latest version: 17.4.3):
NETSDK1022 Duplicate 'EmbeddedResource' items were included. The .NET SDK includes 'EmbeddedResource' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultEmbeddedResourceItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'Views\AboutIntroPart.Edit.cshtml'; 'Views\AboutIntroPart.liquid'; 'Views\AboutIntroPartSettings.Edit.cshtml'; 'Views\AboutIntroPart_Summary.liquid'; 'Views\Home\Index.cshtml'; 'Views_ViewImports.cshtml' C:\Program Files\dotnet\sdk\7.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets 201
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Module should build
Generated Project File:
No additional files added, everything comes from the code generation:
Workaround
Change the project file to reference the projects in the solution, further, disable the 'Nullable' option: