5

The command dotnet build for a razor page app with throws lots of warnings like

CSC : warning RSG002: TargetPath not specified for additional file: 
      C:\dev\Foo\Foo\Pages\Admin\Administration\Users\Delete.cshtml. 
      [C:\dev\Foo\Foo\Foo.csproj]   

    .... lots of other files with the same warning

This is my build engine

C:\dev\Foo\Foo>dotnet build
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.   

  Determining projects to restore...

Questions

  1. Do all developers need to have the same local file structure?
  2. For example if Sheldon uses C:\dev\foo are Raj and Howard not allowed to use d:\mycode\bar\foo?
  3. How do i specify the TargetPath?
  4. Or in other words What do i have to do to remove the cause for the warning?
surfmuggle
  • 5,527
  • 7
  • 48
  • 77
  • At first, I though there may some wrong with the folder, so I created a web project in my side with the same structure, but everything worked fine. Could you pls open your project with VS 2022 and test again? – Tiny Wang Oct 24 '22 at 04:14

1 Answers1

3

I encountered the same warnings but resolved them by running dotnet clean

Jeremiah
  • 31
  • 2