예제 #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
파일: Program.cs 프로젝트: shahid-pk/cli
        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);
        }