Пример #1
0
        public string GetAssemblyPath(string buildConfiguration)
        {
            var compilationOptions = _project.GetCompilerOptions(_framework, buildConfiguration);
            var outputExtension    = FileNameSuffixes.DotNet.DynamicLib;

            if (_framework.IsDesktop() && compilationOptions.EmitEntryPoint.GetValueOrDefault())
            {
                outputExtension = FileNameSuffixes.DotNet.Exe;
            }

            return(Path.Combine(
                       GetOutputDirectoryPath(buildConfiguration),
                       _project.Name + outputExtension));
        }
Пример #2
0
        public override IEnumerable <string> All()
        {
            foreach (var file in base.All())
            {
                yield return(file);
            }

            if (Project.HasRuntimeOutput(Config))
            {
                if (!Framework.IsDesktop())
                {
                    yield return(DepsJson);

                    yield return(RuntimeConfigJson);
                }

                // If the project actually has an entry point
                var hasEntryPoint = Project.GetCompilerOptions(targetFramework: null, configurationName: Configuration).EmitEntryPoint ?? false;
                if (hasEntryPoint)
                {
                    // Yield the executable
                    yield return(Executable);
                }
            }

            if (File.Exists(Config))
            {
                yield return(Config);
            }
        }
Пример #3
0
        public virtual IEnumerable <string> All()
        {
            yield return(Assembly);

            yield return(PdbPath);

            var compilerOptions = Project.GetCompilerOptions(Framework, Configuration);

            if (compilerOptions.GenerateXmlDocumentation == true)
            {
                yield return(Path.ChangeExtension(Assembly, "xml"));
            }
            foreach (var resource in Resources())
            {
                yield return(resource.Path);
            }
        }
Пример #4
0
        public CompilationOutputFiles(
            string basePath,
            Project project,
            string configuration,
            NuGetFramework framework)
        {
            BasePath = basePath;
            Project = project;
            Configuration = configuration;
            Framework = framework;
            OutputExtension = FileNameSuffixes.DotNet.DynamicLib;

            var compilationOptions = Project.GetCompilerOptions(framework, configuration);
            if (framework.IsDesktop() && compilationOptions.EmitEntryPoint.GetValueOrDefault())
            {
                OutputExtension = FileNameSuffixes.DotNet.Exe;
            }
        }
Пример #5
0
        public CompilationOutputFiles(
            string basePath,
            Project project,
            string configuration,
            NuGetFramework framework)
        {
            BasePath        = basePath;
            Project         = project;
            Configuration   = configuration;
            Framework       = framework;
            OutputExtension = FileNameSuffixes.DotNet.DynamicLib;

            var compilerOptions = Project.GetCompilerOptions(framework, configuration);

            if (framework.IsDesktop() && compilerOptions.EmitEntryPoint.GetValueOrDefault())
            {
                OutputExtension = FileNameSuffixes.DotNet.Exe;
            }
        }
Пример #6
0
        private static string GetProjectOutput(Project project, NuGetFramework framework, string configuration, string outputPath)
        {
            var compilationOptions = project.GetCompilerOptions(framework, configuration);
            var outputExtension = ".dll";

            if (framework.IsDesktop() && compilationOptions.EmitEntryPoint.GetValueOrDefault())
            {
                outputExtension = ".exe";
            }

            return Path.Combine(outputPath, project.Name + outputExtension);
        }