-
Notifications
You must be signed in to change notification settings - Fork 11
/
JSLintNet.targets
35 lines (33 loc) · 1.61 KB
/
JSLintNet.targets
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
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<JSLintNetBuildDir>$(SolutionDir)build\</JSLintNetBuildDir>
<JSLintNetPackageDir>$(TargetDir)Package\</JSLintNetPackageDir>
</PropertyGroup>
<UsingTask TaskName="GetAssemblyVersionInfo" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
<ParameterGroup>
<File ParameterType="System.String" Required="true" />
<Version ParameterType="System.String" Output="true" />
<InformationalVersion ParameterType="System.String" Output="true" />
<Copyright ParameterType="System.String" Output="true" />
<CompanyName ParameterType="System.String" Output="true" />
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs">
var info = System.Diagnostics.FileVersionInfo.GetVersionInfo(File);
Version = info.FileVersion;
InformationalVersion = info.ProductVersion;
Copyright = info.LegalCopyright;
CompanyName = info.CompanyName;
</Code>
</Task>
</UsingTask>
<Target Name="JSLintNetVersion" BeforeTargets="AfterBuild">
<GetAssemblyVersionInfo File="$(TargetPath)">
<Output TaskParameter="Version" PropertyName="JSLintNetVersion" />
<Output TaskParameter="InformationalVersion" PropertyName="JSLintNetInformationalVersion" />
<Output TaskParameter="Copyright" PropertyName="JSLintNetCopyright" />
<Output TaskParameter="CompanyName" PropertyName="JSLintNetCompanyName" />
</GetAssemblyVersionInfo>
</Target>
</Project>