dotnet / dotnet/sdk

Getting error RSG002: TargetPath not specified for additional file: running dotnet watch run for blazor project

Open
#50,702 13 comments 0 reactions 1 assignee Claimed by @tmat View on GitHub
Area-Watch
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

running dotnet watch run for my project is resulting in a myriad of RSG002 errors every time I make a change to one of the files in the project.
I have tried clean and rebuild to no avail. I have also completely deleted all bin and obj directories in my project structure, but I keep the errors.

Any suggestions would be greatly appreciated.

### Expected Behavior

no errors.

### Steps To Reproduce

run my project using dotnet watch run. Make a simple change to a .razor file and the errors will appear and the updates are not applies.

### Exceptions (if any)

getting error RSG002: TargetPath not specified for additional file: for each .razor file in my project.

### .NET Version

9.0.302

### Anything else?

Asp.Net Core 9.0.7

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.