简体   繁体   中英

Why am I getting “Resource file” resx error when running .net core console app on linux?

dotnet run --project ProjectName.csproj

The error I get is:

/usr/share/dotnet/sdk/2.2.301/Microsoft.Common.CurrentVersion.targets(3046,5): error MSB3552: Resource file "**/*.resx" cannot be found. [/path/ProjectName.csproj]

My ProjectName.csproj does not contain any resources:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
    <PackageReference Include="MongoDB.Driver" Version="2.8.1" />
    <PackageReference Include="ServiceStack.Kestrel" Version="5.5.0" />
    <PackageReference Include="ServiceStack.Server" Version="5.5.0" />
  </ItemGroup>

  <ItemGroup>
    <None Update="appsettings.Development.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
    <None Update="appsettings.Production.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
  </ItemGroup>

</Project>

The project folder had a folder called 'd:\\something'

$ ls
ProjectName.csproj   'd:\something'

After removing that folder, the app started.

The folder was not referenced/mentioned by the csproj nor any source file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM