本文整理汇总了C#中ICSharpCode.SharpDevelop.Project.MSBuildBasedProject类的典型用法代码示例。如果您正苦于以下问题:C# MSBuildBasedProject类的具体用法?C# MSBuildBasedProject怎么用?C# MSBuildBasedProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MSBuildBasedProject类属于ICSharpCode.SharpDevelop.Project命名空间,在下文中一共展示了MSBuildBasedProject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpenCoverSettingsFileName
public void OpenCoverSettingsFileName()
{
MSBuildBasedProject project = new MSBuildBasedProject(
new ProjectCreateInformation(MockSolution.Create(), new FileName(@"C:\temp\test.csproj")));
Assert.AreEqual(@"C:\temp\test.OpenCover.Settings", OpenCoverSettings.GetFileName(project));
}
示例2: TestableSharpDevelopProjectSystem
public TestableSharpDevelopProjectSystem(MSBuildBasedProject project)
: this(project,
new FakeFileService(project),
new FakePackageManagementProjectService(),
new FakeLogger())
{
}
示例3: PartCoverSettingsFileName
public void PartCoverSettingsFileName()
{
MSBuildBasedProject project = new MSBuildBasedProject(MSBuildInternals.CreateEngine());
project.FileName = @"C:\temp\test.csproj";
Assert.AreEqual(@"C:\temp\test.PartCover.Settings", PartCoverSettings.GetFileName(project));
}
示例4: SetUpFixture
public void SetUpFixture()
{
wixNodeBuilder = new WixProjectNodeBuilder();
project = new MSBuildBasedProject(MSBuildInternals.CreateEngine());
project.IdGuid = "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF";
project.FileName = @"C:\Projects\Test\test.csproj";
}
示例5: LogProjectImportsChanged
void LogProjectImportsChanged(MSBuildBasedProject project)
{
logger.Log(
MessageLevel.Info,
"Project imports have been modified outside SharpDevelop for project '{0}'.",
project.Name);
}
示例6: References
public References(
MSBuildBasedProject project,
IPackageManagementProjectService projectService)
{
this.msbuildProject = project;
this.projectService = projectService;
}
示例7: Load
public void Load(MSBuildBasedProject project, string configuration, string platform)
{
UpdateTargetFrameworkCombo();
if (DocumentationFile.Value.Length > 0) {
documentFileIsChecked = true;
}
}
示例8: InstallPackages
public void InstallPackages(
IEnumerable<PackageReference> packageReferences,
MSBuildBasedProject project)
{
List<InstallPackageAction> actions = GetInstallPackageActions(packageReferences, project);
packageActionRunner.Run(actions);
}
示例9: Project
public Project(MSBuildBasedProject project)
: this(
project,
new PackageManagementProjectService(),
new PackageManagementFileService())
{
}
示例10: SetupProject
private void SetupProject(MSBuildBasedProject project)
{
var projectFile = project.MSBuildProjectFile;
// Fix project type
projectFile.AddProperty("ProjectTypeGuids", "{337B7DB7-2D1E-448D-BEBF-17E887A46E37};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}");
// Set property values
projectFile.AddProperty("TargetFrameworkVersion", ProjectCreateData.TargetFrameworkVersion);
projectFile.AddProperty("AndroidVersion", "$(TargetFrameworkVersion)");
projectFile.AddProperty("ApkFilename", project.Name + ".apk");
projectFile.AddProperty("PackageName", "com." + project.Name);
projectFile.AddProperty("ApkCertificatePath", ProjectCreateData.CertificatePath);
projectFile.AddProperty("ApkCertificateThumbprint", ProjectCreateData.CertificateThumbprint);
// Add Dot42ExtensionPath properties
projectFile.AddProperty("Dot42ExtensionsPath", @"$(Registry:HKEY_CURRENT_USER\SOFTWARE\TallComponents\[email protected])").Condition = " '$(Dot42ExtensionsPath)' == '' ";
projectFile.AddProperty("Dot42ExtensionsPath", @"$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\TallComponents\[email protected])").Condition = " '$(Dot42ExtensionsPath)' == '' ";
// Add dot42 Import
projectFile.AddImport(@"$(Dot42ExtensionsPath)\Dot42.CSharp.targets");
// Add R.cs
projectFile.AddItem("Compile", "$(ResourcesGeneratedCodePath)R.cs");
// Add additional library
foreach (var name in ProjectCreateData.AdditionalLibraryNames)
{
projectFile.AddItem("Reference", name);
}
}
示例11: ProjectContentContainer
public ProjectContentContainer(MSBuildBasedProject project, IProjectContent initialProjectContent)
{
if (project == null)
throw new ArgumentNullException("project");
this.project = project;
this.projectContent = initialProjectContent.SetAssemblyName(project.AssemblyName).SetLocation(project.OutputAssemblyFullPath);
this.assemblyModel = (IUpdateableAssemblyModel)project.AssemblyModel;
this.assemblyModel.AssemblyName = this.projectContent.AssemblyName;
this.assemblyModel.FullAssemblyName = this.projectContent.FullAssemblyName;
this.cacheFileName = GetCacheFileName(project.FileName);
SD.ProjectService.ProjectItemAdded += OnProjectItemAdded;
SD.ProjectService.ProjectItemRemoved += OnProjectItemRemoved;
SD.AssemblyParserService.AssemblyRefreshed += OnAssemblyRefreshed;
List<FileName> filesToParse = new List<FileName>();
foreach (var file in project.Items.OfType<FileProjectItem>()) {
if (IsParseableFile(file)) {
var fileName = file.FileName;
parserService.AddOwnerProject(fileName, project, startAsyncParse: false, isLinkedFile: file.IsLink);
filesToParse.Add(fileName);
}
}
SD.ParserService.LoadSolutionProjectsThread.AddJob(
monitor => Initialize(monitor, filesToParse),
"Loading " + project.Name + "...", filesToParse.Count + LoadingReferencesWorkAmount);
}
示例12: Save
protected override bool Save(MSBuildBasedProject project, string configuration, string platform)
{
if (signAssemblyCheckBox.IsChecked == true) {
this.AssemblyOriginatorKeyMode.Value = "File";
}
return base.Save(project, configuration, platform);
}
示例13: Init
public void Init()
{
resultChangedCalled = false;
classesAdded = new List<TestClass>();
classesRemoved = new List<TestClass>();
// Create a project.
project = new MockCSharpProject();
project.Name = "TestProject";
ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project);
nunitFrameworkReferenceItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem);
// Add a test class with a TestFixture attributes.
projectContent = new MockProjectContent();
projectContent.Language = LanguageProperties.None;
MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture");
c.SetCompoundClass(c);
c.Attributes.Add(new MockAttribute("TestFixture"));
projectContent.Classes.Add(c);
// Add a second class that has no test fixture attribute.
MockClass nonTestClass = new MockClass(projectContent);
projectContent.Classes.Add(nonTestClass);
testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport();
testProject = new TestProject(project, projectContent, testFrameworks);
testProject.TestClasses.TestClassAdded += TestClassAdded;
testProject.TestClasses.TestClassRemoved += TestClassRemoved;
testClass = testProject.TestClasses[0];
}
示例14: Init
public void Init()
{
solution = new Solution();
project1 = new MockCSharpProject(solution);
project1.Name = "A";
ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project1);
refProjectItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(project1, refProjectItem);
solution.Folders.Add(project1);
project2 = new MockCSharpProject(solution);
project2.Name = "Z";
refProjectItem = new ReferenceProjectItem(project2);
refProjectItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(project2, refProjectItem);
solution.Folders.Add(project2);
MockProjectContent projectContent = new MockProjectContent();
projectContent.Project = project1;
treeView = new DummyParserServiceTestTreeView();
treeView.ProjectContentForProject = projectContent;
treeView.AddSolution(solution);
projects = treeView.GetProjects();
}
示例15: CreateProjectItem
void CreateProjectItem()
{
project = WebReferenceTestHelper.CreateTestProject("C#");
projectItem = new ServiceReferencesProjectItem(project);
projectItem.Include = @"Service References\";
ProjectService.AddProjectItem(project, projectItem);
}