Új hozzászólás Aktív témák

  • Keem1

    addikt

    Sracok, egy nagy anomaliaba utkoztem.
    Csinaltam egy szuz ASP Razor porjectet, en populaltam fel, de hibaba utkoztem.

    Alapesetben ezt kapom:
    PS C:\Users\ik\source\repos\nuup> dotnet run -c Release -f net6.0
    Building...
    C:\Program Files\dotnet\sdk\7.0.405\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.Shared.targets(213,5)
    : error NETSDK1022: Duplicate 'Content' items were included. The .NET SDK includes 'Content' items from your project di
    rectory by default. You can either remove these items from your project file, or set the 'EnableDefaultContentItems' pr
    operty 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: 'wwwroot\css\site.css'; 'wwwroot\errors\error.html'; 'wwwroot\robots.txt'
    [C:\Users\ik\source\repos\nuup\nuup.csproj::TargetFramework=net6.0]
    The build failed. Fix the build errors and run again.
    PS C:\Users\ik\source\repos\nuup>

    Ha beteszem ezt: <EnableDefaultContentItems>false</EnableDefaultContentItems> akkor viszont minden oldal 404-es lesz, a full kezdolapot is beleertve.

    Ez a csproj file-m:
    <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFrameworks>net6.0;net7.0</TargetFrameworks> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <EnableDefaultContentItems>false</EnableDefaultContentItems> </PropertyGroup> <ItemGroup> <Folder Include="Data\"/> <Folder Include="Models\"/> <Folder Include="Classes\"/> <Content Include="wwwroot\**\*"> <CopyToPublishDirectory>Always</CopyToPublishDirectory> </Content> </ItemGroup></Project>

    Mit rontok el? :F

Új hozzászólás Aktív témák