Strange error in VS 2005, .NET CF 2.0

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,
 
D

Dariusz

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top