Strange error in VS 2005, .NET CF 2.0

  • Thread starter Thread starter Daan
  • Start date Start date
D

Daan

We are using Visual Studio 2005 to create a .NET Compact Framework 2.0
application. In our solution, we have several projects. Sometimes, when
trying to build the solution, we get the following error:

The "GenerateResource" task failed unexpectedly.
System.InvalidOperationException: Collection was modified; enumeration
operation may not execute.
at
Microsoft.Build.Shared.ExceptionHandling.RethrowUnlessFileIO(Exception e)
at Microsoft.Build.Tasks.GenerateResource.NeedSeparateAppDomain()
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode
howToExecuteTask, Hashtable projectItemsAvailableToTask,
BuildPropertyGroup projectPropertiesAvailableToTask, Boolean&
taskClassWasFound)

This error can occur at any of the projects within the solution, and it
seems arbitrary at which of the projects it occurs. Restarting VS is
usually the solution, while sometimes a complete reboot of the PC is
necessary to fix it.

Has anyone encountered the same problem of can someone point us to a
solution? Thanks for any help,
 
I have the same problem. It is very annoying.
Unfortunately, I don't know the solution.

I have several projects in my solution too.
I encountered that exception is raised for projects which references class library with custom controls.

I know only one solution ? Visual Studio restart

Best Regards
Darek
 
I have the same issue. I have a .Net CF 2.0 project and whenever I modify a
form, I get this error during a compile. Shutting down and restarting the
IDE gets rid of the compile error. This is a real productivity killer.

Can someone from Microsoft please respond to this reproducible issue?

Thanks!


Error 1 The "GenerateResource" task failed unexpectedly.
System.InvalidOperationException: Collection was modified; enumeration
operation may not execute.
at Microsoft.Build.Shared.ExceptionHandling.RethrowUnlessFileIO(Exception
e)
at Microsoft.Build.Tasks.GenerateResource.NeedSeparateAppDomain()
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode
howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup
projectPropertiesAvailableToTask, Boolean&
taskClassWasFound) C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets 1616 9 ItisPpc
 
Back
Top