Bug 13946 - error MSB4044: C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3): The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Con
Summary: error MSB4044: C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.C...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.3.x
Hardware: Macintosh Windows
: --- normal
Target Milestone: ---
Assignee: Dominique Louis
URL:
Depends on:
Blocks:
 
Reported: 2013-08-13 05:32 UTC by ben ishiyama-levy
Modified: 2013-10-31 14:43 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
'Xamarin.MonoTouch.Common.targets' modified (7.93 KB, application/octet-stream)
2013-08-13 05:32 UTC, ben ishiyama-levy
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description ben ishiyama-levy 2013-08-13 05:32:33 UTC
Created attachment 4615 [details]
'Xamarin.MonoTouch.Common.targets' modified

Since the mono 3x upgrade, we are getting the trace below when attempting to run (any configuration) our application.
The only remedy so far we have is to modify the file in question 'Xamarin.MonoTouch.Common.targets' and add seemigly missing parameters. Without being sure of any side effects, unfortunately. Please find the modified file attached.


------------------------------------------------------------------------------------------------------------------------
C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]
Done Building Project "D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target(s)) -- FAILED.

Build FAILED.

  D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj(188,3): warning MSB4011: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets (22,2)". This is most likely a build authoring error. This subsequent import will be ignored. 


"D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target) (1) ->
(_ResolveAssemblies target) -> 
  C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]
Comment 1 Marek Habersack 2013-08-16 03:06:15 UTC
Since OutputDirectory is assigned a combination of "$(ProjectDir)$(OutputDir)", both of which are set by MSBuild and are not modified or touched in any way by the Xamarin.iOS build system, I suppose the problem is the double inclusion of the Microsoft.CSharp.targets file.

Can you edit the Tipster.UI.Containers.MT.csproj project directly, find the line which says:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

and remove it. After that, please retry the build.
Comment 2 ben ishiyama-levy 2013-08-16 04:42:06 UTC
Hi,

done as suggested, but it still fails. As per before, simply building is fine, but building when running on the simulator or device fails.
Please find trace below:

Getting device...
Starting debug on:iPhone 6.1
Remote building...
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18051]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 16/08/2013 16:38:19.
Project "D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" on node 1 (_RemoteBuild target(s)).
C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]
Done Building Project "D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target(s)) -- FAILED.

Build FAILED.

"D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target) (1) ->
(_ResolveAssemblies target) -> 
  C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.91


Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18051]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 16/08/2013 16:38:19.
Project "D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" on node 1 (_RemoteBuild target(s)).
C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]
Done Building Project "D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target(s)) -- FAILED.

Build FAILED.

"D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target) (1) ->
(_ResolveAssemblies target) -> 
  C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(68,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.91
Comment 3 Marek Habersack 2013-08-16 04:57:13 UTC
The error happens on the Windows side while attempting to deploy to the simulator, but it is still an issue with the VS/msbuild side. Would you mind modifying the Xamarin.MonoTouch.Common.targets file to add some debugging output (set your VS build preferences to set the verbose msbuild output):

find a line in the .targets file which says

<Target Name="_ResolveAssemblies" DependsOnTargets="_ResolveMonoTouchFramework">

and put below it the following two lines:

<Message Text="ProjectDir == $(ProjectDir)"/>
<Message Text="OutDir == $(OutDir)"/>

Then rebuild the solution, look for the two above messages in the output and paste it here. Thanks!
Comment 4 ben ishiyama-levy 2013-08-16 05:23:50 UTC
Hi,

There we go! Thanks.

Mono.IOS.VisualStudio.Commands.CreateIPA Warning: 0 : Could not determine if any of the solution projects are Xamarin.iOS ones. 'Build IPA' menu option will remain disabled.
System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
   at EnvDTE.Project.get_FileName()
   at Mono.VisualStudio.Extension.ExtensionMethods.GetProjectTypeGuids(Project project)
   at Mono.IOS.VisualStudio.Utilities.MonoTouchProjectHelper.IsMonoTouchProject(Project project)
   at Mono.IOS.VisualStudio.Commands.CreateIPA.QueryStatus(IMenuCommand command)
Mono.IOS.VisualStudio.Commands.CreateIPA Warning: 0 : Could not determine if any of the solution projects are Xamarin.iOS ones. 'Build IPA' menu option will remain disabled.
System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
   at EnvDTE.Project.get_FileName()
   at Mono.VisualStudio.Extension.ExtensionMethods.GetProjectTypeGuids(Project project)
   at Mono.IOS.VisualStudio.Utilities.MonoTouchProjectHelper.IsMonoTouchProject(Project project)
   at Mono.IOS.VisualStudio.Commands.CreateIPA.QueryStatus(IMenuCommand command)
Mono.IOS.VisualStudio.Commands.CreateIPA Warning: 0 : Could not determine if any of the solution projects are Xamarin.iOS ones. 'Build IPA' menu option will remain disabled.
System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
   at EnvDTE.Project.get_FileName()
   at Mono.VisualStudio.Extension.ExtensionMethods.GetProjectTypeGuids(Project project)
   at Mono.IOS.VisualStudio.Utilities.MonoTouchProjectHelper.IsMonoTouchProject(Project project)
   at Mono.IOS.VisualStudio.Commands.CreateIPA.QueryStatus(IMenuCommand command)
Mono.Android.VisualStudio.MonoAndroidPackage Warning: 0 : Initializing Mono.Android.VisualStudio.MonoAndroidPackage
Mono.Android.VisualStudio.MonoAndroidPackage Warning: 0 : Activation Check
Mono.Android.VisualStudio.MonoAndroidPackage Warning: 0 : Trial Ended : False. Start Upgrade : False.  Start Expired : False. Start Invalid : False.  Business Features : True.
Mono.IOS.VisualStudio.MonoTouchPackage Error: 0 : Background task error
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<Mono.VisualStudio.Extension.Update>> Mono.VisualStudio.Extension.UpdateClient.CheckForUpdates(System.Guid, System.String, Mono.VisualStudio.Extension.UpdateLevel, System.String, System.String)'.
   at Mono.Android.VisualStudio.UpdaterTasks.CheckForUpdates()
   at Mono.Android.VisualStudio.UpdaterTasks.<AutomaticUpdateCheck>b__0(Task`1 license_task)
   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<Mono.VisualStudio.Extension.Update>> Mono.VisualStudio.Extension.UpdateClient.CheckForUpdates(System.Guid, System.String, Mono.VisualStudio.Extension.UpdateLevel, System.String, System.String)'.
   at Mono.Android.VisualStudio.UpdaterTasks.CheckForUpdates()
   at Mono.Android.VisualStudio.UpdaterTasks.<AutomaticUpdateCheck>b__0(Task`1 license_task)
   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

Mono.Android.VisualStudio.MonoAndroidPackage Error: 0 : Background task error
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<Mono.VisualStudio.Extension.Update>> Mono.VisualStudio.Extension.UpdateClient.CheckForUpdates(System.Guid, System.String, Mono.VisualStudio.Extension.UpdateLevel, System.String, System.String)'.
   at Mono.Android.VisualStudio.UpdaterTasks.CheckForUpdates()
   at Mono.Android.VisualStudio.UpdaterTasks.<AutomaticUpdateCheck>b__0(Task`1 license_task)
   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<Mono.VisualStudio.Extension.Update>> Mono.VisualStudio.Extension.UpdateClient.CheckForUpdates(System.Guid, System.String, Mono.VisualStudio.Extension.UpdateLevel, System.String, System.String)'.
   at Mono.Android.VisualStudio.UpdaterTasks.CheckForUpdates()
   at Mono.Android.VisualStudio.UpdaterTasks.<AutomaticUpdateCheck>b__0(Task`1 license_task)
   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'D:\Work\tippstr\UI.Containers\MT.Container\bin\iPhoneSimulator\DebugFake\TipsterUIContainerMT.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 'vshost.NotifyLoad' (0x26bc) has exited with code 0 (0x0).
The thread '<No Name>' (0x1534) has exited with code 0 (0x0).
The thread '<No Name>' (0x2054) has exited with code 0 (0x0).
The thread '<No Name>' (0x1b1c) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0x2754) has exited with code 0 (0x0).
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'D:\Work\tippstr\UI.Containers\MT.Container\bin\iPhoneSimulator\DebugFake\TipsterUIContainerMT.exe', Symbols loaded.
'TipsterUIContainerMT.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
Getting device...
Starting debug on:iPhone 6.1
Remote building...
Microsoft (R) Build Engine version 4.0.30319.17929

[Microsoft .NET Framework, version 4.0.30319.18051]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 16/08/2013 17:21:42.
Project "D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" on node 1 (_RemoteBuild target(s)).
_ResolveAssemblies:
  ProjectDir == D:\Work\tippstr\UI.Containers\MT.Container\
  OutDir == bin\iPhoneSimulator\DebugFake\
C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(69,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]
Done Building Project "D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target(s)) -- FAILED.

Build FAILED.

"D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj" (_RemoteBuild target) (1) ->
(_ResolveAssemblies target) -> 
  C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.MonoTouch.Common.targets(69,3): error MSB4044: The "ResolveAssemblies" task was not given a value for the required parameter "OutputDirectory". [D:\Work\tippstr\UI.Containers\MT.Container\Tipster.UI.Containers.MT.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.97

The program '[9312] TipsterUIContainerMT.vshost.exe: Program Trace' has exited with code 0 (0x0).
The program '[9312] TipsterUIContainerMT.vshost.exe: Managed (v4.0.30319)' has exited with code -1 (0xffffffff).
Comment 5 Dominique Louis 2013-08-16 08:11:00 UTC
Hi Ben,
  Could you please confirm which version of Xamarin.iOS you are currently
using?
I do find it odd that you log contains both MonoTouch and MonoAndroid messages.

Also if you create a simple app from the provided templates, does this also
throw the same targets error, with the original/unmodified targets file? 

Thanks.
Comment 6 Alan McGovern 2013-10-31 14:43:49 UTC
This issue has been fixed as part of the 1.8 series so please give that a try when it is released to the alpha/beta/stable channel