Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while loading Xamarin.iOS.Tasks.dll #3538

Closed
taori opened this issue Aug 10, 2018 · 3 comments
Closed

Error while loading Xamarin.iOS.Tasks.dll #3538

taori opened this issue Aug 10, 2018 · 3 comments
Labels
a/buildchain s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one.

Comments

@taori
Copy link

taori commented Aug 10, 2018

I am getting this error:
error MSB4062: Die Xamarin.iOS.Tasks.CopyFileToWindows-Aufgabe konnte nicht aus der C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Tasks.dll-Assembly geladen werden. Stellen Sie sicher, dass die -Deklaration korrekt ist, die Assembly und alle zugehörigen Abhängigkeiten verfügbar sind und die Aufgabe eine öffentliche Klasse enthält, die Microsoft.Build.Framework.ITask implementiert.

Error MSB4062: the Xamarin. iOS. Tasks. CopyFileToWindows task could not be loaded from the C:Program Files (x86) microsoft Visual Studio2017EnterpriseMSBuildXamariniOSXamarin.iOS.Tasks.dll-Assembly. Make sure that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

According to some research it appears to be related to what is also happening here:
GitTools/GitVersion#1307

If you know an alternative way to make the build process copy the dsym folder to windows again that would also help a lot. It stopped doing that at some point during components. Switching laptop to upload symbols manually instead of automation is awful

@pauldipietro pauldipietro added this to New in Triage Aug 10, 2018
@samhouts
Copy link
Member

  1. Does this happen with one project in particular, or any project?
  2. If you start a new Xamarin.Forms project, do you see this error?
  3. Does it only happen when you update your Xamarin.Forms nuget packages, or does it happen all the time?
  4. Does restarting Visual Studio help?
  5. What version of Visual Studio 2017 are you using?
  6. Can you attach a small project that this occurs on?

Thanks!

@samhouts samhouts added s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. a/buildchain labels Aug 10, 2018
@samhouts samhouts moved this from New to Needs Info in Triage Aug 10, 2018
@taori
Copy link
Author

taori commented Aug 11, 2018

  • Does this happen with one project in particular, or any project? any, all that's needed is a postbuild event in the ios csproj, which references the UsingTasks-Task to load a task of the Xamarin.iOS.Tasks.dll
  • If you start a new Xamarin.Forms project, do you see this error? Can't check earlier than 10 days - no work pc available
  • Does it only happen when you update your Xamarin.Forms nuget packages, or does it happen all the time? all the time - if you look at the link i referenced it points out that this is happening because Microsoft.Build.Utilities.v4.0 is the assembly used for that task to derive from, instead of an assembly which is compatible for the build chain
  • Does restarting Visual Studio help? no
  • What version of Visual Studio 2017 are you using? 2017.7.6 Enterprise
  • Can you attach a small project that this occurs on? Not sooner than in 10 days. All that is needed is to reproduce should be step 1.

@PureWeen
Copy link
Contributor

PureWeen commented Sep 10, 2018

Closing for now without a repro

I added this to an ios project just to test a post build step using those tasks

  <UsingTask TaskName="DetectSdkLocations" AssemblyFile="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.Tasks.dll" >
  </UsingTask>
  <Target Name="SomethingToDo" AfterTargets="AfterCompile" >
    <DetectSdkLocations TargetFrameworkIdentifier="8.1" />
  </Target>

And it ran fine without any exceptions

I'm also not quite following your requirement to tap into those tasks in order to access the dSYMS

If your CI process is generating an IPA file it'll generate a DSYM file that you can upload
https://docs.microsoft.com/en-us/xamarin/ios/troubleshooting/questions/symbolicate-ios-crash

You can use an ItemGroup to recursively gather up the Dsym file and then use a copy task to copy it wherever

https://blogs.msdn.microsoft.com/msbuild/2005/11/07/how-to-recursively-copy-files-using-the-copy-task/

Triage automation moved this from Needs Info to Closed Sep 10, 2018
@samhouts samhouts removed this from Closed in Triage Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/buildchain s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one.
Projects
None yet
Development

No branches or pull requests

3 participants