Dotnet-Boxed / Templates

.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
https://RehanSaeed.com
MIT License
3.4k stars 491 forks source link

Two assets found targeting the same path #2029

Open johnkattenhorn opened 1 year ago

johnkattenhorn commented 1 year ago

Describe the bug

Using Boxed.API Project Template and Visual Studio 2022 the outputting Project won't compile. The build fails with **Two assets found targeting the same path with incompatible asset kinds:

'C:\code\scratch\api.boxed\api.boxed\api.boxed\Source\api.boxed\wwwroot.well-known\security.txt' with kind 'All' 'C:\code\scratch\api.boxed\api.boxed\api.boxed\Source\api.boxed\wwwroot.well-known\security.txt' with kind 'All' for path '.well-known/security.txt' api.boxed C:\Program Files\dotnet\sdk\7.0.302\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets 419

Steps to reproduce

  1. Create New Boxed API Project
  2. Select the following settings Source Control = None, Cloud Provider=Azure, Tick Open Telemetry, Logging = Serilog, Tick Application Insights, Tick = HTTPS, Tick = HSTS Preload, Distributed Cache = InMemory, Docker Registry = Docker Hub
  3. Click Create
  4. Compile the solution
  5. This should error with the above.

Expected behaviour

It should compile with no errors (and no warnings).

Template

AIP

.NET Boxed Version

Latest

Visual Studio Version

Visual Studio 2022

.NET Version

.NET 6

TrungNV31197 commented 1 year ago

Same ~~~

VictorioBerra commented 1 year ago

As a temp fix I think you can just edit the csproj and remove the XML that includes the wwwroot stuff.