Background
Experiencing error building a project in Visual Studio.
Error
Error Image
Error Message
- Error CS0229 Ambiguity between ‘_jobSummary’ and ‘_jobSummary’
- Error CS0121 The call is ambiguous between the following methods or properties: ‘ExecJobActionAsync(Func<DbConnection, Task<int>>)’ and ‘ExecJobActionAsync(Func<DbConnection, Task<int>>)’
- Error CS0229 Ambiguity between ‘IsEnabled’ and ‘IsEnabled’
- Error CS0229 Ambiguity between ‘IsRunning’ and ‘IsRunning’
Troubleshooting
After a full day’s work, realized that the source of the problem is that I had backed up one of the source code files before editing it.
Unfortunately, the backup file was placed in a folder underneath the project’s working directory.
Remediation
To correct please do one of the following :-
- Move the folders and files outside of the project’s working directory
- Explicitly exclude the folder or file from the project
Visual Studio .Net Project
Outline
- Choose the folders or files to exclude
- Right click on your selection
- From the drop-down menu, please choose Exclude
Image
Image – Exclude From Project ( Initiate )
Image – Exclude From Project ( Completed )
Review
Project
To review included and excluded files you can do the following :-
Outline
- Ensure that Solution Explorer is tailored to show all files
- Review each .csproj file
Image
Solution Explorer
Image – Show All Files
Project File ( .CSProj )
Image
Explain
- Upon reviewing the .csproj file we notice the following
- A new ItemGroup
- The Item is tagged with “Compile Remove“
Summary
Please be careful where you place copied files as it might inadvertently be included in your project.