-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSharpDevelop.Build.VisualBasic.targets
181 lines (163 loc) · 8.68 KB
/
SharpDevelop.Build.VisualBasic.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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file can be used to compile VB.NET applications against other .NET Framework versions -->
<PropertyGroup>
<!--
Save original target framework version because we'll need to change it
to work around a problem in Microsoft's C# targets
-->
<SharpDevelopTargetFrameworkVersion>$(TargetFrameworkVersion)</SharpDevelopTargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v1.0' ">
<VbcToolPath>$(SystemRoot)\Microsoft.NET\Framework\v1.0.3705</VbcToolPath>
<SharpDevelopUse1xCompiler>true</SharpDevelopUse1xCompiler>
<SharpDevelopUseMicrosoftFramework>true</SharpDevelopUseMicrosoftFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v1.1' ">
<VbcToolPath>$(SystemRoot)\Microsoft.NET\Framework\v1.1.4322</VbcToolPath>
<SharpDevelopUse1xCompiler>true</SharpDevelopUse1xCompiler>
<SharpDevelopUseMicrosoftFramework>true</SharpDevelopUseMicrosoftFramework>
<!-- Work around MsBuild problem: Microsoft.VisualBasic.targets adds NoWarn entries that -->
<!-- don't exist in v1.1 when version is set to anything else than v1.0 -->
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(SharpDevelopUse1xCompiler)' == 'true' ">
<UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>
<PlatformTarget/>
</PropertyGroup>
<PropertyGroup Condition=" ('$(TargetFrameworkVersion)' == 'v2.0') or ('$(TargetFrameworkVersion)' == '') ">
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SharpDevelopUseMicrosoftFramework>true</SharpDevelopUseMicrosoftFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'CF 1.0' ">
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<SharpDevelopUseCompactFramework>true</SharpDevelopUseCompactFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'CF 2.0' ">
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SharpDevelopUseCompactFramework>true</SharpDevelopUseCompactFramework>
</PropertyGroup>
<!-- Use Microsoft's VB standard targets -->
<Import Condition=" '$(SharpDevelopUseMicrosoftFramework)' == 'true' " Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<!-- Override properties created by Microsoft.VisualBasic.targets -->
<PropertyGroup Condition=" '$(SharpDevelopUse1xCompiler)' == 'true' ">
<AssemblySearchPaths>
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{AssemblyFolders};
$(OutputPath);
{GAC}
</AssemblySearchPaths>
<TargetFrameworkDirectory>$(VbcToolPath)</TargetFrameworkDirectory>
</PropertyGroup>
<ItemGroup Condition=" '$(SharpDevelopUse1xCompiler)' == 'true' ">
<TargetFrameworkDirectoryItem Include="$(VbcToolPath)">
<InProject>false</InProject>
</TargetFrameworkDirectoryItem>
</ItemGroup>
<!-- GetFrameworkPaths overwrites TargetFrameworkDirectory, so modify it -->
<!-- to be inactive if SharpDevelopUse1xCompiler is set. -->
<Target Name="GetFrameworkPaths" DependsOnTargets="$(GetFrameworkPathsDependsOn)" Condition=" '$(SharpDevelopUseMicrosoftFramework)' == 'true' ">
<Error Condition=" ('$(SharpDevelopUse1xCompiler)' == 'true') And !Exists('$(VbcToolPath)\Vbc.exe') "
Text="Could not find the VB.NET compiler in $(VbcToolPath)."/>
<GetFrameworkPath Condition=" '$(SharpDevelopUse1xCompiler)' != 'true' ">
<Output TaskParameter="Path" PropertyName="TargetFrameworkDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkDirectoryItem"/>
</GetFrameworkPath>
<GetFrameworkSDKPath Condition=" '$(SharpDevelopUse1xCompiler)' != 'true' ">
<Output TaskParameter="Path" PropertyName="TargetFrameworkSDKDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkSDKDirectoryItem"/>
</GetFrameworkSDKPath>
</Target>
<!-- Redefine the Vbc target and set noconfig to false - preventing the Vbc
task from passing the noconfig argument to the Vbc 1.1 compiler which does not
support it -->
<Target
Name="CoreCompile"
Inputs="$(MSBuildAllProjects);
@(Compile);
@(ManifestResourceWithNoCulture);
$(ApplicationIcon);
$(AssemblyOriginatorKeyFile);
@(ManifestNonResxWithNoCultureOnDisk);
@(ReferencePath);
@(CompiledLicenseFile);
@(EmbeddedDocumentation);
@(CustomAdditionalCompileInputs)"
Outputs="@(DocFileItem);
@(IntermediateAssembly);
$(NonExistentFile);
@(CustomAdditionalCompileOutputs)"
DependsOnTargets="$(CoreCompileDependsOn)"
Condition=" '$(SharpDevelopUseMicrosoftFramework)' == 'true' "
>
<Vbc
AdditionalLibPaths="$(AdditionalLibPaths)"
AddModules="@(AddModules)"
BaseAddress="$(BaseAddress)"
CodePage="$(CodePage)"
DebugType="$(DebugType)"
DefineConstants="$(FinalDefineConstants)"
DelaySign="$(DelaySign)"
DisabledWarnings="$(NoWarn)"
DocumentationFile="@(DocFileItem)"
EmitDebugInformation="$(DebugSymbols)"
ErrorReport="$(ErrorReport)"
FileAlignment="$(FileAlignment)"
GenerateDocumentation="$(GenerateDocumentation)"
Imports="@(Import)"
KeyContainer="$(KeyContainerName)"
KeyFile="$(KeyOriginatorFile)"
MainEntryPoint="$(StartupObject)"
NoConfig="false"
NoStandardLib="$(NoStdLib)"
NoWarnings="$(_NoWarnings)"
Optimize="$(Optimize)"
OptionCompare="$(OptionCompare)"
OptionExplicit="$(OptionExplicit)"
OptionStrict="$(OptionStrict)"
OptionStrictType="$(OptionStrictType)"
OutputAssembly="@(IntermediateAssembly)"
Platform="$(PlatformTarget)"
References="@(ReferencePath)"
RemoveIntegerChecks="$(RemoveIntegerChecks)"
Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
ResponseFiles="$(CompilerResponseFile)"
RootNamespace="$(RootNamespace)"
SdkPath="$(FrameworkPathOverride)"
Sources="@(Compile)"
TargetCompactFramework="$(TargetCompactFramework)"
TargetType="$(OutputType)"
ToolPath="$(VbcToolPath)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
Utf8Output="$(Utf8Output)"
Verbosity="$(VbcVerbosity)"
WarningsAsErrors="$(WarningsAsErrors)"
WarningsNotAsErrors="$(WarningsNotAsErrors)"
Win32Icon="$(ApplicationIcon)"
Win32Resource="$(Win32Resource)"
/>
</Target>
<!-- Mono imports -->
<Import Condition=" '$(TargetFrameworkVersion)' == 'Mono v1.1' " Project="$(SharpDevelopBinPath)\SharpDevelop.Build.Mono.Mbas.targets"/>
<Import Condition=" '$(TargetFrameworkVersion)' == 'Mono v2.0' " Project="$(SharpDevelopBinPath)\SharpDevelop.Build.Mono.Mbas.targets"/>
<!-- Compact framework property adjustments: -->
<!-- When StdLib is not set, set it to true and add reference to mscorlib -->
<!-- Set PlatformFamilyName and PlatformID if required -->
<PropertyGroup Condition=" '$(SharpDevelopUseCompactFramework)' == 'true' ">
<PlatformFamilyName Condition=" '$(PlatformFamilyName)' == '' ">PocketPC</PlatformFamilyName>
<PlatformID Condition=" '$(PlatformID)' == '' ">WinCE</PlatformID>
<SharpDevelopAddReferenceToCompactMscorlib Condition="'$(NoStdLib)' == ''">true</SharpDevelopAddReferenceToCompactMscorlib>
<NoStdLib Condition="'$(NoStdLib)' == ''">true</NoStdLib>
</PropertyGroup>
<ItemGroup Condition=" '$(SharpDevelopAddReferenceToCompactMscorlib)' == 'true' ">
<Reference Include="mscorlib"/>
</ItemGroup>
<!-- Compact framework imports -->
<Import Condition=" ('$(TargetFrameworkVersion)' == 'v1.0') And ('$(SharpDevelopUseCompactFramework)' == 'true') "
Project="$(MSBuildBinPath)\Microsoft.CompactFramework.VisualBasic.v1.targets"/>
<Import Condition=" ('$(TargetFrameworkVersion)' == 'v2.0') And ('$(SharpDevelopUseCompactFramework)' == 'true') "
Project="$(MSBuildBinPath)\Microsoft.CompactFramework.VisualBasic.targets"/>
</Project>