代码之家  ›  专栏  ›  技术社区  ›  Tornike Gomareli

Xamarin IOS生成错误-无法链接程序集。处理项目的引用时出错

  •  0
  • Tornike Gomareli  · 技术社区  · 7 年前

    我在我们的项目中发现了非常奇怪的问题。 我们在办公室工作,在不同的MAC电脑上,在同一个项目上。

    我的项目有构建错误,但我的同事没有。

    这就是我的错误

    enter image description here

    满满的 建立输出 这是吗

     Module: EuroProduct.SharedPCL.dll
    
        No compiled resources. Skipping writing assembly.
    Target _CopyFilesMarkedCopyLocal:
        Touching "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/obj/Debug/netstandard2.0/EuroProduct.SharedPCL.csproj.CopyComplete".
    Target GetCopyToOutputDirectoryItems:
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.TransferModels/EuroProduct.TransferModels.csproj" (GetCopyToOutputDirectoryItems target(s)):
    
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/SharedAbstractions/SharedAbstractions.csproj" (GetCopyToOutputDirectoryItems target(s)):
    
    Target GenerateBuildDependencyFile:
      Skipping target "GenerateBuildDependencyFile" because all output files are up-to-date with respect to the input files.
    Target CopyFilesToOutputDirectory:
        EuroProduct.SharedPCL -> /Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/bin/Debug/netstandard2.0/EuroProduct.SharedPCL.dll
    
    Done building project "EuroProduct.SharedPCL.csproj".
    __________________________________________________
    Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" (Build target(s)):
    
    Target _BeforeCoreCompileInterfaceDefinitions:
      Skipping target "_BeforeCoreCompileInterfaceDefinitions" because all output files are up-to-date with respect to the input files.
    Target _CoreCompileInterfaceDefinitions:
      Skipping target "_CoreCompileInterfaceDefinitions" because all output files are up-to-date with respect to the input files.
    Target _BeforeCoreCompileImageAssets:
      Skipping target "_BeforeCoreCompileImageAssets" because all output files are up-to-date with respect to the input files.
    Target _CoreCompileImageAssets:
      Skipping target "_CoreCompileImageAssets" because all output files are up-to-date with respect to the input files.
    Target _CoreCompileColladaAssets:
      Skipping target "_CoreCompileColladaAssets" because it has no inputs.
    Target _BeforeCoreCompileSceneKitAssets:
      Skipping target "_BeforeCoreCompileSceneKitAssets" because it has no inputs.
    Target _BeforeCoreCompileSceneKitAssets:
      Skipping target "_BeforeCoreCompileSceneKitAssets" because it has no inputs.
    Target _BeforeCoreCompileSceneKitAssets:
      Skipping target "_BeforeCoreCompileSceneKitAssets" because it has no inputs.
    Target _CoreCompileSceneKitAssets:
      Skipping target "_CoreCompileSceneKitAssets" because it has no inputs.
    Target _BeforeCompileTextureAtlases:
      Skipping target "_BeforeCompileTextureAtlases" because it has no inputs.
    Target _BeforeCompileTextureAtlases:
      Skipping target "_BeforeCompileTextureAtlases" because it has no inputs.
    Target _BeforeCompileTextureAtlases:
      Skipping target "_BeforeCompileTextureAtlases" because it has no inputs.
    Target _CoreCompileTextureAtlases:
      Skipping target "_CoreCompileTextureAtlases" because it has no inputs.
    Target _BeforeCompileCoreMLModels:
      Skipping target "_BeforeCompileCoreMLModels" because all output files are up-to-date with respect to the input files.
    Target _CoreCompileCoreMLModels:
      Skipping target "_CoreCompileCoreMLModels" because all output files are up-to-date with respect to the input files.
    Target _CoreOptimizePngImages:
      Skipping target "_CoreOptimizePngImages" because all output files are up-to-date with respect to the input files.
    Target _CoreOptimizePropertyLists:
      Skipping target "_CoreOptimizePropertyLists" because it has no inputs.
    Target _CoreOptimizeLocalizationFiles:
      Skipping target "_CoreOptimizeLocalizationFiles" because it has no inputs.
    Target _GetProjectReferenceTargetFrameworkProperties:
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj" (GetTargetFrameworks target(s)):
    
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/SharedAbstractions/SharedAbstractions.csproj" (GetTargetFrameworks target(s)):
    
    Target ResolveProjectReferences:
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj" (GetTargetPath target(s)):
    
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/SharedAbstractions/SharedAbstractions.csproj" (GetTargetPath target(s)):
    
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj" (GetNativeManifest target(s)):
    
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/SharedAbstractions/SharedAbstractions.csproj" (GetNativeManifest target(s)):
    
    Target GenerateTargetFrameworkMonikerAttribute:
      Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
    Target CoreCompile:
      Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
    Target _CopyFilesMarkedCopyLocal:
        Touching "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/obj/iPhoneSimulator/Debug/EuroProduct.IOS.csproj.CopyComplete".
    Target GetCopyToOutputDirectoryItems:
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj" (GetCopyToOutputDirectoryItems target(s)):
    
        __________________________________________________
        Project "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/EuroProduct.IOS.csproj" is building "/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/SharedAbstractions/SharedAbstractions.csproj" (GetCopyToOutputDirectoryItems target(s)):
    
    Target CopyFilesToOutputDirectory:
        EuroProduct.IOS -> /Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/bin/iPhoneSimulator/Debug/EuroProduct.IOS.exe
    Target _DetectSigningIdentity:
        Detected signing identity:
          Bundle Id: com.mpdc.europroduct
          App Id: com.mpdc.europroduct
    Target _CopyResourcesToBundle:
      Skipping target "_CopyResourcesToBundle" because all output files are up-to-date with respect to the input files.
    Target _DetectDebugNetworkConfiguration:
          DebugIPAddresses: 127.0.0.1
    Target _CompileAppManifest:
      Skipping target "_CompileAppManifest" because all output files are up-to-date with respect to the input files.
    Target _ParseExtraMtouchArgs:
          NoSymbolStrip Output: true
          NoDSymUtil Output: false
    Target _CompileToNative:
        /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch @/Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.IOS/obj/iPhoneSimulator/Debug/response-file.rsp 
        MTOUCH : error MT2001: Could not link assemblies. Reason: Error while processing references of 'EuroProduct.IOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
    Done building target "_CompileToNative" in project "EuroProduct.IOS.csproj" -- FAILED.
    
    Done building project "EuroProduct.IOS.csproj" -- FAILED.
    
    Build FAILED.
    
    /Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj : warning NU1701: Package 'Ideine.ModernHttpClient 3.2.2' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
    /Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj : warning NU1701: Package 'Microsoft.Bcl 1.1.10' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
    /Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj : warning NU1701: Package 'Microsoft.Net.Http 2.2.29' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
    /Users/tornikegomareli/Desktop/MPDCEuroProduct/EuroProduct-master/EuroProduct.SharedPCL/EuroProduct.SharedPCL.csproj : warning NU1701: Package 'MPDC.Container 1.0.6' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
    MTOUCH : error MT2001: Could not link assemblies. Reason: Error while processing references of 'EuroProduct.IOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
        4 Warning(s)
        1 Error(s)
    
    Time Elapsed 00:00:03.58
    
    Build succeeded.
        0 Warning(s)
        0 Error(s)
    
    Time Elapsed 00:00:03.58
    
    ---------------------- Done ----------------------
    
    Build: 1 error, 4 warnings
    

    我在堆栈溢出上搜索了很多类似的问题,但找不到任何解决方案。

    我也删除了一些软件包,但没有任何帮助。 但当我删除 沙马林 包裹 它正在建设中,没有任何问题。 FFMImageLoader的版本是2.3.6,在上一个版本中也进行了更新,但没有任何帮助。

    请给我一些建议,在这种情况下该怎么办。

    1 回复  |  直到 7 年前
        1
  •  0
  •   Lucas Zhang    7 年前

    将-v-v-v-v添加到project iOS构建设置中的“其他mtouch参数”将有助于诊断问题。之后,您可以搜索MT2001的生成输出并查看内部异常。显然,每个项目可能会因什么程序集导致链接器失败而有所不同。您可能需要根据输出添加、删除或修复引用。 例如,您可能在(.Net Standard 2.0,但可能不相关)核心库中包含了一个nuget包,但忘记了将其包含在特定于平台的项目中。

    这是 a similar case 你可以参考。

    另外,你的VS版本是什么?更新VS时,有时会出现此问题。

    推荐文章