当前位置: 首页>>代码示例>>C#>>正文


C# Project.IsJavaScriptProject方法代码示例

本文整理汇总了C#中Project.IsJavaScriptProject方法的典型用法代码示例。如果您正苦于以下问题:C# Project.IsJavaScriptProject方法的具体用法?C# Project.IsJavaScriptProject怎么用?C# Project.IsJavaScriptProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Project的用法示例。


在下文中一共展示了Project.IsJavaScriptProject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EnablePackageRestore

        private void EnablePackageRestore(Project project)
        {
            if (project.IsWebSite())
            {
                // Can't do anything with Website
                return;
            }

            if (!VsVersionHelper.IsVisualStudio2010 &&
                (project.IsJavaScriptProject() ||  project.IsNativeProject()))
            {
                if (VsVersionHelper.IsVisualStudio2012)
                {
                    EnablePackageRestoreInVs2012(project);
                }
                else
                {
                    EnablePackageRestoreInVs2013(project);
                }
            }
            else
            {
                MsBuildProject buildProject = project.AsMSBuildProject();
                EnablePackageRestore(project, buildProject, saveProjectWhenDone: true);
            }
        }
开发者ID:Mailaender,项目名称:xamarin-nuget,代码行数:26,代码来源:PackageRestoreManager.cs

示例2: EnablePackageRestore

        private void EnablePackageRestore(Project project)
        {
            if (project.IsWebSite() || project.IsJavaScriptProject())
            {
                // Can't do anything with Website
                // Also, the Javascript Metro project system has some weird bugs 
                // that cause havoc with the package restore mechanism
                return;
            }

            MsBuildProject buildProject = project.AsMSBuildProject();

            AddSolutionDirProperty(project, buildProject);
            AddNuGetTargets(project, buildProject);
            SetMsBuildProjectProperty(project, buildProject, "RestorePackages", "true");

            if (project.IsJavaScriptProject())
            {
                // JavaScript project requires an extra kick
                // in order to save changes to the project file.
                // TODO: Check with VS team to ask them to fix 
                buildProject.Save();
            }
        }
开发者ID:themotleyfool,项目名称:NuGet,代码行数:24,代码来源:PackageRestoreManager.cs

示例3: EnablePackageRestore

        private void EnablePackageRestore(Project project)
        {
            if (project.IsWebSite())
            {
                // Can't do anything with Website
                return;
            }

            if (!VsVersionHelper.IsVisualStudio2010 && 
                (project.IsJavaScriptProject() ||  project.IsNativeProject()))
            {
                project.DoWorkInWriterLock(
                    buildProject => EnablePackageRestore(project, buildProject, saveProjectWhenDone: false));

                // When inside the Write lock, calling Project.Save() will cause a deadlock.
                // Thus we will save it after and outside of the Write lock.
                project.Save();
            }
            else
            {
                MsBuildProject buildProject = project.AsMSBuildProject();
                EnablePackageRestore(project, buildProject, saveProjectWhenDone: true);
            }
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:24,代码来源:PackageRestoreManager.cs

示例4: EnablePackageRestore

        private void EnablePackageRestore(Project project)
        {
            if (project.IsWebSite())
            {
                // Can't do anything with Website
                // Also, the Javascript Metro project system has some weird bugs 
                // that cause havoc with the package restore mechanism
                return;
            }

            if (project.IsJavaScriptProject())
            {
                EnablePackageRestoreForJavaScriptProject(project);
            }
            else
            {
                MsBuildProject buildProject = project.AsMSBuildProject();
                EnablePackageRestore(project, buildProject, saveProjectWhenDone: true);
            }
        }
开发者ID:atheken,项目名称:nuget,代码行数:20,代码来源:PackageRestoreManager.cs

示例5: EnablePackageRestore

        private void EnablePackageRestore(Project project)
        {
            if (project.IsWebSite())
            {
                // Can't do anything with Website
                return;
            }

            MsBuildProject buildProject = project.AsMSBuildProject();

            AddSolutionDirProperty(project, buildProject);
            AddNuGetTargets(project, buildProject);
            SetMsBuildProjectProperty(project, buildProject, "RestorePackages", "true");

            if (project.IsJavaScriptProject())
            {
                // JavaScript project requires an extra kick
                // in order to save changes to the project file.
                // TODO: Check with VS team to ask them to fix 
                buildProject.Save();
            }
        }
开发者ID:monoman,项目名称:NugetCracker,代码行数:22,代码来源:PackageRestoreManager.cs


注:本文中的Project.IsJavaScriptProject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。