Beispiel #1
0
        public bool BuildNativeImages(PublishRoot root)
        {
            var success = true;

            foreach (var runtime in root.Runtimes)
            {
                NuGetDependencyResolver resolver;
                if (!_resolverLookup.TryGetValue(runtime.Framework, out resolver))
                {
                    throw new InvalidOperationException("No matching framework is found for " + runtime.Framework);
                }

                var runtimeBin = Path.Combine(runtime.TargetPath, "bin");

                var options = new CrossgenOptions()
                {
                    CrossgenPath = Path.Combine(runtimeBin, "crossgen.exe"),
                    InputPaths   = ResolveOutputAssemblies(root, resolver),
                    RuntimePath  = runtimeBin,
                    Symbols      = false
                };

                var crossgenManager = new CrossgenManager(options);
                success &= crossgenManager.GenerateNativeImages();

                if (!success)
                {
                    return(false);
                }
            }
            return(success);
        }
Beispiel #2
0
        public bool BuildNativeImages(PublishRoot root)
        {
            var success = true;

            // REVIEW: Does does doing this for multiple runtimes make sense?
            foreach (var runtime in root.Runtimes)
            {
                var runtimeBin = Path.Combine(runtime.TargetPath, "bin");

                var options = new CrossgenOptions()
                {
                    CrossgenPath = Path.Combine(runtimeBin, "crossgen.exe"),
                    InputPaths   = ResolveOutputAssemblies(root),
                    RuntimePath  = runtimeBin,
                    Symbols      = false
                };

                var crossgenManager = new CrossgenManager(options);
                success &= crossgenManager.GenerateNativeImages();

                if (!success)
                {
                    return(false);
                }
            }
            return(success);
        }