C
Carsten Marx
Hello,
i've the follwoing scenario:
Visual Studio 2005 prof.
Windows Mobile 5.0 SDK installed
Pocket PC Dell Axim X51v with CF 2.0
Target Platform is Windows Mobile 5.0
I've created a standard resource via the project properties and added
some resources (icon, png,...)
I'm trying to use the resources in that way:
this.Icon = Resources.Icon; (where Icon is a resource object with the
type Icon)
this.logo.Image = (Image)Resources.Logo; (where Logo isa png-File which
is imported as resource)
If i deploy the project i get the following:
System.NotSupportedException was unhandled
Message="System.Drawing.Icon"
StackTrace:
bei System.Resources.ResourceReader.LoadObjectV2()
bei System.Resources.ResourceReader.LoadObject()
bei System.Resources.RuntimeResourceSet.GetObject()
bei System.Resources.ResourceManager.GetObject()
bei Test.Properties.Resources.get_Icon()
bei Test.Start..ctor()
bei Test.Start.Main()
If i try to debug the project i get the message:
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) Test
What's wrong here? Any hint for me?
Thanks in advance...
Best regards
Carsten Marx
P.S.: The project was ported from CF 1 to CF 2.
i've the follwoing scenario:
Visual Studio 2005 prof.
Windows Mobile 5.0 SDK installed
Pocket PC Dell Axim X51v with CF 2.0
Target Platform is Windows Mobile 5.0
I've created a standard resource via the project properties and added
some resources (icon, png,...)
I'm trying to use the resources in that way:
this.Icon = Resources.Icon; (where Icon is a resource object with the
type Icon)
this.logo.Image = (Image)Resources.Logo; (where Logo isa png-File which
is imported as resource)
If i deploy the project i get the following:
System.NotSupportedException was unhandled
Message="System.Drawing.Icon"
StackTrace:
bei System.Resources.ResourceReader.LoadObjectV2()
bei System.Resources.ResourceReader.LoadObject()
bei System.Resources.RuntimeResourceSet.GetObject()
bei System.Resources.ResourceManager.GetObject()
bei Test.Properties.Resources.get_Icon()
bei Test.Start..ctor()
bei Test.Start.Main()
If i try to debug the project i get the message:
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) Test
What's wrong here? Any hint for me?
Thanks in advance...
Best regards
Carsten Marx
P.S.: The project was ported from CF 1 to CF 2.