Our TFS build has broken following updating the XAML build definition. Changes included modifying the template and a few parameters. The trace is below
TF215097: An error occurred while initializing a build for build definition [REDACTED]:
Exception Message: Cannot set unknown member 'Microsoft.TeamFoundation.Build.Activities.Git.GitPull.CheckoutSubmodules'. (type XamlObjectWriterException)
Exception Stack Trace: at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()
at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)
at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
at Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.ValidateWorkflow(Activity activity, ValidationSettings validationSettings)
at Microsoft.TeamFoundation.Build.Hosting.BuildProcessCache.LoadFromXaml(String workflowXaml, TextExpressionImports textExpressionImports)
at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary`2 dataContext)
at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)
The build fails in the first few seconds as this is the process that is trying to retrieve the source. However, I cannot come to any conclusions as to why this error is happening. A Google search doesn't bring up anything useful.
TFS version 2013
Has anyone encountered this error and if so how did you fix it?
If I need to provide more information please ask.
When you modify the Build process template and therefore it’s no longer in sync with the build definition you may get TF215097 error.
#jessehouwing's suspicion makes sense. I can't find too many articles to elaborate this issue, but in this MSND documentation mentions, if you want to edit a custom template, You must use only Visual Studio 2013 to edit your build process templates of TFS 2013.
Related
I am quite new to dotnet and Keras.NET, and I was trying to set it up on a goorm.io container. After installing the prerequisites (adding $HOME/.keras/keras.json for Tensorflow backend and pip install numpy), and then adding Keras.NET, I tried to run the XOR sample code, but ran into an error.
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'python37' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libpython37: cannot open shared object file: No such file or directory
at Python.Runtime.Runtime.Py_IsInitialized()
at Python.Runtime.Runtime.Initialize(Boolean initSigs)
at Python.Runtime.PythonEngine.Initialize(IEnumerable1 args, Boolean setSysArgv, Boolean initSigs) at Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs) at Python.Runtime.PythonEngine.Initialize() at Numpy.np.InstallAndImport(Boolean force) at Numpy.np.<>c.<.cctor>b__599_0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue()
at System.Lazy1.get_Value() at Numpy.np.get_self() at Numpy.np.get_float32() at Numpy.DtypeExtensions.GetDtype(Object obj) at Numpy.np.array[T](T[,] object, Dtype dtype, Nullable1 copy, String order, Nullable1 subok, Nullable1 ndmin)
at Proj.Program.Main(String[] args) in /workspace/XOR/Proj/Program.cs:line 14
I do not know how to share with the python37 directory. If someone could direct me in the right direction, it would be much appreciated. By the way, I am using Linux if that helps.
Thanks
I am new to Apache spark and trying to run this on Windows machine with Mobius.
but i am getting exception while running it.
first of all i have setup following environment variables
JAVA_HOME C:\Program Files\Java\jdk1.8.0_152
HADOOP_HOME C:\winutils
SPARK_HOME c:\spark [spark-2.0.2-bin-hadoop2.6]
SPARKCLR_HOME E:\SparkClr\spark-clr_2.11-2.0.200\runtime
In code provided correct file to read data from as file:///E:/Mobius/Mobius/SampleText.txt
I tried to run it in debug mode
E:\SparkClr\spark-clr_2.11-2.0.200\runtime\scripts>sparkclr-submit.cmd debug
[sparkclr-submit.cmd] SPARKCLR_JAR=spark-clr_2.11-2.0.200.jar
[sparkclr-submit.cmd] LAUNCH_CLASSPATH="E:\SparkClr\spark-clr_2.11-2.0.200\runtime\lib\spark-clr_2.11-2.0.200.jar;c:\spark\jars\*"
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
17/12/19 11:34:23 INFO CSharpRunner: Starting CSharpBackend!
17/12/19 11:34:25 INFO CSharpRunner: Port number used by CSharpBackend is 5567
***********************************************************************
* [CSharpRunner.main] Backend running debug mode. Press enter to exit *
***********************************************************************
17/12/19 11:35:09 INFO SparkContext: Running Spark version 2.0.2
In my App.config Added following Entry [Port name with i got from above]
<add key="CSharpBackendPortNumber" value="5567"/>
I am getting below Exception message
JVM method execution failed: Nonstatic method partitions failed for class 12 when called with no parameters
Stack Trace
at Microsoft.Spark.CSharp.Interop.Ipc.JvmBridge.CallJavaMethod(Boolean isStatic, Object classNameOrJvmObjectReference, String methodName, Object[] parameters)
at Microsoft.Spark.CSharp.Interop.Ipc.JvmBridge.CallNonStaticJavaMethod(JvmObjectReference objectId, String methodName)
at Microsoft.Spark.CSharp.Proxy.Ipc.RDDIpcProxy.GetNumPartitions()
at Microsoft.Spark.CSharp.Core.RDD`1.GetDefaultPartitionNum()
at Microsoft.Spark.CSharp.Core.PairRDDFunctions.PartitionBy[K,V](RDD`1 self, Int32 numPartitions, Func`2 partitionFunc)
at Microsoft.Spark.CSharp.Core.PairRDDFunctions.ReduceByKey[K,V](RDD`1 self, Func`3 reduceFunc, Int32 numPartitions)
at Microsoft.Spark.CSharp.Examples.WordCountExample.Main(String[] args) in E:\Mobius\Mobius\examples\Batch\WordCount\Program.cs:line 35
I am not sure about CSharpWorkerPath.
Please help if anyone face this kind of issue earlier.
Before posting this question I reviewed:
Runtime error when trying to run Fluent NHibernate tutorial example
Fluent nHibernate error - Could not compile the mapping document: (XmlDocument)
and many more similar questions which I was hoping could shed some light on my issue. No luck so far:
I was working a solution for some time now and everything was going fine until my most recent change. The solution still compiles but fails on startup with this exception:
An unhandled exception of type
'FluentNHibernate.Cfg.FluentConfigurationException' occurred in
xx.Initialization.dll
in View Details it says:
An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail."
PotentialReasons: Count = 0
InnerException: Could not compile the mapping document: xx.Website.Persistence.Repository.Mappings.UI.yyDataDto.hbm.xml
Inner exception: JIT Compiler encountered an internal limitation.
The .hbm.xml file that the exception is referring to is intact and there were no changed made to it. All of my code changes are covered by tests and whatever I changed doesn't seem to involve the exception directly.
To troubleshoot this, I committed and pushed all of my changes (feature branch) and asked my co-worker to get latest version. He was able to run the solution without any exceptions. I tried restarting my VS2013, my workstation, deleting my repository and getting the solution from scratch through source control as well as by a direct copy of my co-worker's solution folder (latest version) and still receiving the same error.
Not sure what else to try. Any tips/suggestions would be greatly appreciated. Thanks!
edit/update:
Today I attempted to repair my VS2013 installation, that didn't help. I then updated to latest service pack 4. Also no results.
I'm guessing at this point that something may be wrong with my debugger/settings because if I build the project and launch it (without debugging or by navigating to Bin folder and executing directly) it runs without exceptions. If I debug, I get the exception.
Here's the stacktrace:
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.ConfigureSessionFactory[TFluentMapping](String defaultSchema, String connectionStringKey)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.<>c__DisplayClassa`1.<RegisterNHibernate>b__5()
at Castle.MicroKernel.Registration.ComponentRegistration`1.<>c__DisplayClassf`1.<UsingFactoryMethod>b__e(IKernel k, ComponentModel m, CreationContext c)
at Castle.MicroKernel.ComponentActivator.FactoryMethodActivator`1.Instantiate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context)
at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service)
at Castle.MicroKernel.DefaultKernel.Resolve(String key, Type service)
at Castle.MicroKernel.DefaultKernel.Resolve[T](String key)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.<>c__DisplayClassa`1.<RegisterNHibernate>b__7(IKernel kernel)
at Castle.MicroKernel.Registration.ComponentRegistration`1.<>c__DisplayClass12`1.<UsingFactoryMethod>b__11(IKernel k, ComponentModel m, CreationContext c)
at Castle.MicroKernel.ComponentActivator.FactoryMethodActivator`1.Instantiate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service)
at Castle.MicroKernel.DefaultKernel.Resolve(String key, Type service)
at Castle.Windsor.WindsorContainer.Resolve[T](String key)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.RegisterNHibernate[TFluentMapping](String factoryName, String sessionName, String defaultSchema, String connectionStringKey)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.Start()
at Company.Framework.Startup.Behaviour.BehaviourManager.AddAndInitialize[T](Action`1 initialize)
at Company.Framework.Startup.Behaviour.BehaviourManager.Add[T](Action`1 initialize)
at Company.Project.Initialization.ServiceInitializator.ConfigureBehaviours() in c:\Path\Project.Initialization\ServiceInitializator.cs:line 99
The solution was to uninstall VS2013 completely and re-install it from scratch. After I did that, the exception went away.
I tried to remember what could've caused this and so far my only suspicion is that maybe when I ran CCleaner (prior to this issue appearing), it removed files or registry entries which made VS behave in such a way.
Does anyone know what this means? I am getting this error in my CI build (CruiseControl.Net + NAnt + MSBuild), locally this project compiles just fine...
My.Web.csproj: Error MSB4014: The build was aborted because of an internal failure.
Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: refCount should not be less than 1.
at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args)
at Microsoft.Build.Collections.CopyOnWriteDictionary\`2.CopyOnWriteBackingDictionary\`2.get_HasNoClones()
at Microsoft.Build.Collections.CopyOnWriteDictionary\`2.set_Item(K key, V value)
at Microsoft.Build.Collections.CopyOnWriteDictionary`2.System.Collections.IDictionary.set_Item(Object key, Object value)
at Microsoft.Build.BuildEngine.BuildItem..ctor(String itemName, ITaskItem taskItem)
at Microsoft.Build.BuildEngine.TaskEngine.GatherTaskItemOutputs(Lookup lookup, TaskOutput taskOutputSpecification, String itemName, String propertyName, Object outputs)
at Microsoft.Build.BuildEngine.TaskEngine.GatherGeneratedTaskOutputs(Lookup lookup, TaskOutput taskOutputSpecification, String taskParameterName, String itemName, String propertyName, ITask task)
at Microsoft.Build.BuildEngine.TaskEngine.GatherTaskOutputs(TaskExecutionMode howToExecuteTask, ITask task, ItemBucket bucket)
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteBucket(EngineProxy engineProxy, ItemBucket bucket, Int32 bucketNumber, TaskExecutionMode howToExecuteTask)
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(TaskExecutionMode howToExecuteTask, Lookup lookup)
at Microsoft.Build.BuildEngine.TaskExecutionState.TaskEngineExecuteTask(TaskEngine taskEngine, TaskExecutionMode howTaskShouldBeExecuted, Lookup lookup)
at Microsoft.Build.BuildEngine.TaskExecutionState.ExecuteTask()
at Microsoft.Build.BuildEngine.TaskExecutionModule.ExecuteTask(TaskExecutionState taskState)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.SubmitNonIntrinsicTask(XmlElement taskNode, ITaskHost hostObject, ProjectBuildState buildContext)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.ExecuteCurrentTask(ProjectBuildState buildContext)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.ContinueRunningTasks(ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext, Boolean startingFirstTask)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.ContinueBuild(ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext)
at Microsoft.Build.BuildEngine.Project.ExecuteNextActionForProjectContext(ProjectBuildState buildContext, Boolean initialCall)
at Microsoft.Build.BuildEngine.Project.CalculateNextActionForProjectContext(ProjectBuildState buildContext)
at Microsoft.Build.BuildEngine.Project.ContinueBuild(ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext)
at Microsoft.Build.BuildEngine.Project.BuildInternal(BuildRequest buildRequest)
at Microsoft.Build.BuildEngine.Engine.BuildProjectInternalInitial(BuildRequest buildRequest, Project project)
at Microsoft.Build.BuildEngine.Engine.BuildProjectInternal(BuildRequest buildRequest, ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext, Boolean initialCall)
at Microsoft.Build.BuildEngine.Engine.EngineBuildLoop(BuildRequest terminatingBuildRequest)
at Microsoft.Build.BuildEngine.Engine.PostProjectEvaluationRequests(Project project, String[] projectFiles, String[][] targetNames, BuildPropertyGroup[] globalPropertiesPerProject, IDictionary[] targetOutputsPerProject, BuildSettings buildFlags, String[] toolVersions)
Unexpected error while compiling project 'My.Web'
Exception has been thrown by the target of an invocation.
MSB0001: Internal MSBuild Error: refCount should not be less than 1.
I ran into the same problem in a similar environment. In my case, the project had a COM reference to the Active DS Type Library, which wasn't installed on the build server.
To fix the problem, I dropped the COM reference and added a reference to an interop assembly, which was then deployed to the build server.
Found the solution: instead of using <solution> in the build target I called msbuild directly with <exec>. Everything works now.
My problem it's similar with you, I'm have to eliminate two projects that relationship with my solution in mobil enviroment, that cause the conflict with the others projects in my solution.
My other projects are desktop, mvc, webapi enviroment.
I have to create a new solution for my others mobil projects
I am trying to use an Icon in my WPF application, and some images for other things, but I keep getting errors from the Designer View saying stuff like "path-x is not a valid resource or cannot be found." - where "path-x" is the path of whatever image I am trying to use.
If it were looking in the right place, I bet it'd find it ;)
BUT, then, it decided to not give me that error anymore. So, I went ahead and clicked Run (F5), to see my new Icon in the title bar. Only to be confronted with this beast:
"System.Windows.Markup.XamlParseException
occurred Message='Provide value on
'System.Windows.Baml2006.TypeConverterMarkupExtension'
threw an exception.' Line number '5'
and line position '50'.
Source=PresentationFramework
LineNumber=5 LinePosition=50
StackTrace:
at System.Windows.Markup.XamlReader.RewrapException(Exception
e, IXamlLineInfo lineInfo, Uri
baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader
xamlReader, IXamlObjectWriterFactory
writerFactory, Boolean
skipJournaledProperties, Object
rootObject, XamlObjectWriterSettings
settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader
xamlReader, Boolean
skipJournaledProperties, Object
rootObject, XamlAccessLevel
accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream
stream, ParserContext parserContext,
Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object
component, Uri resourceLocator)
at One_Stop_Management.MainWindow.InitializeComponent()
in c:\Users\Jason\Documents\Visual
Studio 2010\Projects\One Stop
Management\One Stop
Management\MainWindow.xaml:line 1
at One_Stop_Management.MainWindow..ctor()
in C:\Users\Jason\Documents\Visual
Studio 2010\Projects\One Stop
Management\One Stop
Management\MainWindow.xaml.cs:line 25
InnerException: System.IO.IOException
Message=Cannot locate resource 'images/favicon.ico'.
Source=PresentationFramework
StackTrace:
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode
mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode
mode, FileAccess access)
at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.get_ContentType()
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri
uri, Stream stream, BitmapCacheOption
cacheOption, Guid& clsId, Boolean&
isOriginalWritable, Stream& uriStream,
UnmanagedMemoryStream&
unmanagedMemoryStream, SafeFileHandle&
safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri
baseUri, Uri uri, Stream stream,
BitmapCreateOptions createOptions,
BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy,
Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri
baseUri, Uri uri, Stream stream,
BitmapCreateOptions createOptions,
BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy)
at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext
context, CultureInfo culture, Object
value)
at System.Windows.Baml2006.TypeConverterMarkupExtension.ProvideValue(IServiceProvider
serviceProvider)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension
me, IServiceProvider serviceProvider)
InnerException: "
Why is this thing giving me attitude? I'm just trying to insert an image...
Updates
Here is the XAML that was produced for the icon when I tried to add the Icon using the Properties Pane:
<Fluent:RibbonWindow x:Class="One_Stop_Management.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
Title="One Stop Management" Height="727" Width="1208" Icon="Resources\favicon.ico">
Latest Update
I can't even add an icon using the properties pane, below is the error it gives me.
Make sure the target is a resource. Then do something like this:
Icon="/MobilWPF;component/Resources/Images/MobileIcon.ico"
where MobilWPF is your namespace, or maybe you're project name? I forget my project name and my namespace are the same.
I've discovered that VS2008 sometimes causes problems like this when you add new resources and then rebuild the project. I've found if you clean the build and then rebuild from scratch the problem disappears. Looks like a VS2008 bug to me.
I fixed this same issue by setting these properties for the image:
Build Action = Content
Copy to Output Directory = Copy always
The exception, if you read through it, says the same thing:
InnerException: System.IO.IOException Message=Cannot locate resource 'images/favicon.ico'.
This is probably because the Images/favicon.ico icon image is not setup correctly. Make sure that it's Build Action is set to "Resource", and that it's in the project under the "Images" folder.
The answer seems to depend on where/how you store the icon. I was trying to do something similar to #iterationx's answer but it didn't work for me, and this is what I finished up with. I'm using VS 2010.
I added the icon as a resource via the project's properties page, under Resources, Add Resource (dropdown), Add existing file. Then I just used the file name in the Icon property:
Icon="my_icon.ico"
I recall a similar situation where my application was crashing, and I eventually tracked it down to an .ico error.
If you're using icons and Windows XP, XP does not support the 256x256 icons. You may need to open the icon in an editor, such as IcoFx, and delete the 256x256 icon.
Setting BuildAction to Resource in resource Properties solved this problem.
Greets
I'm sorry I can't be more helpful. On reading your question at first I thought it'd be just a type mismatch, like where you were specifying a string when it was meant to be an image. The issue seems to be one that has multiple possible resolutions. Instead of listing them all I'll just link you to the Microsoft Connect page that has them on it.
I had this same problem and found that if your project has a space in the name, it won't read the image files correctly. Hope that helps.
use Icon=".\Images\test.ico" this got me working