Experiencing error building a project in Visual Studio.
- 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’
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.
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
- Choose the folders or files to exclude
- Right click on your selection
- From the drop-down menu, please choose Exclude
Image – Exclude From Project ( Initiate )
Image – Exclude From Project ( Completed )
To review included and excluded files you can do the following :-
- Ensure that Solution Explorer is tailored to show all files
- Review each .csproj file
Image – Show All Files
Project File ( .CSProj )
- Upon reviewing the .csproj file we notice the following
- A new ItemGroup
- The Item is tagged with “Compile Remove“
Please be careful where you place copied files as it might inadvertently be included in your project.