本文整理汇总了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);
}
}
示例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();
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
}