Please can anyone tell me the problem with this, I have tried all possible solutions, but not positive outcome, I uninstalled and installed it again but still displays this error. Can anyone help with step solutions, please??
I did appreciate

Please can anyone tell me the problem with this, I have tried all possible solutions, but not positive outcome, I uninstalled and installed it again but still displays this error. Can anyone help with step solutions, please??
I did appreciate

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question.
Prasad RaveendranPosted Oct 12, 2023, 1:35 AM
The error message "The GenerateResource task's output could not be retrieved from the 'FileWritten' parameter. Object does not match target type" is typically encountered when working with resource files in Visual Studio during the build process. It often occurs when there is a mismatch between the type of object expected by a task and the actual output or parameter provided to it.
Here are some steps to diagnose and potentially resolve this issue:
Check Resource Files: Ensure that your resource files (typically .resx files) are correctly configured and do not contain any errors. Resource files should have valid content and be properly linked to your project.
Check Build Actions: In Visual Studio, select your resource files in Solution Explorer and check the "Build Action" property. It should be set to "Embedded Resource" for .resx files. If it's set to another value, change it to "Embedded Resource."
Check Custom Build Tools: If you have any custom build tools or scripts that modify or generate resource files, make sure they are correctly configured and up to date.
Check Dependencies: Ensure that any dependencies or referenced assemblies in your project are compatible and correctly configured. A mismatch in target framework or version can cause this issue.
Clean and Rebuild: Sometimes, simply cleaning and rebuilding the solution can help resolve build-related issues. Right-click on your solution in Solution Explorer and select "Clean," followed by "Rebuild."
Check for Conflicting Extensions: If you are using Visual Studio extensions that affect the build process, try disabling them temporarily to see if they are the source of the problem.
Check MSBuild Targets and Tasks: If you have custom MSBuild targets or tasks in your project, make sure they are correctly implemented and do not interfere with the standard build process.
Update Visual Studio: Ensure that you are using the latest updates and patches for Visual Studio. Some issues may be resolved by updating the IDE.
Examine Output Logs: Check the Output and Error windows in Visual Studio for more detailed error messages or warnings that might provide additional information about the problem.
Review Project Files: Open the project file (.csproj or .vbproj) for your project in a text editor and review the XML configuration. Ensure that all references and properties are correctly defined.
Create a New Project: As a last resort, consider creating a new project and gradually migrating your code and resources to it to see if the issue persists.
If the issue persists after trying these steps, it may be beneficial to seek help on developer forums or community websites where other developers may have encountered and solved similar problems with specific project configurations or toolsets.