forked from killswitch1111/powerguivsx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowerShellProjectFactory.cs
More file actions
43 lines (33 loc) · 1.52 KB
/
Copy pathPowerShellProjectFactory.cs
File metadata and controls
43 lines (33 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using Microsoft.VisualStudioTools.Project;
using IServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider;
namespace PowerShellTools.Project
{
[Guid("F5034706-568F-408A-B7B3-4D38C6DB8A32")]
public class PowerShellProjectFactory : ProjectFactory
{
private readonly CommonProjectPackage _package;
private readonly bool _dependenciesResolved;
public PowerShellProjectFactory(CommonProjectPackage package, bool dependenciesResolved)
: base(package)
{
_dependenciesResolved = dependenciesResolved;
this._package = package;
var loc = Assembly.GetExecutingAssembly().Location;
var fileInfo = new FileInfo(loc);
//TODO:
var targetspath = Path.Combine(fileInfo.Directory.FullName, "PowerShellTools.Targets");
// package.SetGlobalProperty("PowerGUIVSXTargets", targetspath);
var taskpath = Path.Combine(fileInfo.Directory.FullName, "PowerShellTools.Targets");
//BuildEngine.SetGlobalProperty("PowerGUIVSXTasks", loc);
}
internal override ProjectNode CreateProject()
{
var project = new PowerShellProjectNode(_package, _dependenciesResolved);
project.SetSite((IServiceProvider)((System.IServiceProvider)this._package).GetService(typeof(IServiceProvider)));
return project;
}
}
}