forked from smartstore/SmartStoreNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFixRazorIntellisense.targets
More file actions
62 lines (46 loc) · 2.61 KB
/
Copy pathFixRazorIntellisense.targets
File metadata and controls
62 lines (46 loc) · 2.61 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllDependencies Condition="'$(CopyAllDependencies)'==''">true</CopyAllDependencies>
</PropertyGroup>
<!-- BuildXxx part -->
<Target Name="CopyAllDependencies" Condition="'$(CopyAllDependencies)'=='true'" DependsOnTargets="DetectAllDependencies">
<Copy Condition="'%(IndirectDependency.FullPath)'!=''"
SourceFiles="%(IndirectDependency.FullPath)"
DestinationFolder="$(ProjectDir)bin\"
SkipUnchangedFiles="true" >
<Output TaskParameter="CopiedFiles" ItemName="IndirectDependencyCopied" />
</Copy>
<Message Importance="low"
Condition="'%(IndirectDependencyCopied.FullPath)'!=''
and '%(IndirectDependencyCopied.Extension)'!='.pdb'
and '%(IndirectDependencyCopied.Extension)'!='.xml'"
Text="Indirect dependency copied: %(IndirectDependencyCopied.FullPath)" />
</Target>
<Target Name="DetectAllDependencies" DependsOnTargets="ResolveAssemblyReferences">
<Message Importance="low" Text="Direct dependency: %(ReferencePath.Filename)%(ReferencePath.Extension)" />
<Message Importance="low" Text="Direct dependency: %(ReferencePath.FullPath).Contains('.NETFramework')=='True'" />
<!-- Creating dependency list -->
<CreateItem Include="%(ReferencePath.FullPath)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(ReferencePath.FullPath)', '(?i)(.*?)(mscorlib|System|System\.Web|xxxSystem\.Core|System\.Xml)\.dll')) != 'True'">
<Output TaskParameter="Include" ItemName="_IndirectDependency"/>
</CreateItem>
<!-- Filtering dependency list by existence -->
<CreateItem Include="%(_IndirectDependency.FullPath)" Condition="Exists('%(_IndirectDependency.FullPath)')">
<Output TaskParameter="Include" ItemName="IndirectDependency"/>
</CreateItem>
<!-- Creating copied indirect dependency list -->
<CreateItem Include="@(_IndirectDependency->'$(ProjectDir)bin\%(Filename)%(Extension)')">
<Output TaskParameter="Include" ItemName="_ExistingIndirectDependency"/>
</CreateItem>
<!-- Filtering copied indirect dependency list by existence -->
<CreateItem Include="%(_ExistingIndirectDependency.FullPath)" Condition="Exists('%(_ExistingIndirectDependency.FullPath)')">
<Output TaskParameter="Include" ItemName="ExistingIndirectDependency"/>
</CreateItem>
</Target>
<!-- Build sequence modification -->
<PropertyGroup>
<CoreBuildDependsOn>
$(CoreBuildDependsOn);
CopyAllDependencies
</CoreBuildDependsOn>
</PropertyGroup>
</Project>