Пример #1
0
        public void BindingOldStyle(ApplePlatform platform)
        {
            var project = "BindingOldStyle";

            Configuration.IgnoreIfIgnoredPlatform(platform);

            var project_path = GetProjectPath(project, platform: platform);

            Clean(project_path);
            Configuration.CopyDotNetSupportingFiles(Path.GetDirectoryName(project_path));

            var tmpdir                 = Cache.CreateTemporaryDirectory();
            var outputPath             = Path.Combine(tmpdir, "OutputPath");
            var intermediateOutputPath = Path.Combine(tmpdir, "IntermediateOutputPath");
            var properties             = GetDefaultProperties();

            properties ["OutputPath"]             = outputPath + Path.DirectorySeparatorChar;
            properties ["IntermediateOutputPath"] = intermediateOutputPath + Path.DirectorySeparatorChar;

            var rv     = DotNet.AssertPackFailure(project_path, properties);
            var errors = BinLog.GetBuildLogErrors(rv.BinLogPath).ToArray();

            Assert.AreEqual(1, errors.Length, "Error count");
            Assert.AreEqual($"Creating a NuGet package is not supported for projects that have ObjcBindingNativeLibrary items. Migrate to use NativeReference items instead.", errors [0].Message, "Error message");
        }