1
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
<Import Project="Microsoft.Common.targets" />
4
<UsingTask TaskName="Microsoft.Build.Tasks.CreateVisualBasicManifestResourceName" AssemblyName="Microsoft.Build.Tasks, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
6
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildBinPath)\Microsoft.VisualBasic.targets</MSBuildAllProjects>
7
<DefaultLanguageSourceExtension>.vb</DefaultLanguageSourceExtension>
8
<Language>VB</Language>
12
The CreateManifestResourceNames target create the manifest resource names from the .RESX
16
@(ResxWithNoCulture) - The names the non-culture .RESX files.
17
@(ResxWithCulture) - The names the culture .RESX files.
18
@(NonResxWithNoCulture) - The names of the non-culture non-RESX files (like bitmaps, etc).
19
@(NonResxWithCulture) - The names of the culture non-RESX files (like bitmaps, etc).
22
@(ManifestResourceWithNoCultureName) - The corresponding manifest resource name (.RESOURCE)
23
@(ManifestResourceWithCultureName) - The corresponding manifest resource name (.RESOURCE)
24
@(ManifestNonResxWithNoCulture) - The corresponding manifest resource name.
25
@(ManifestNonResxWithCulture) - The corresponding manifest resource name.
27
For VB applications the transformation is like:
29
Resources1.resx => RootNamespace.Resources1 => Build into main assembly
30
SubFolder\Resources1.resx => RootNamespace.Resources1 => Build into main assembly
31
Resources1.fr.resx => RootNamespace.Resources1.fr => Build into satellite assembly
32
Resources1.notaculture.resx => RootNamespace.Resources1.notaculture => Build into main assembly
34
For other project systems, this transformation may be different.
37
<CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
40
Name="CreateManifestResourceNames"
41
Condition="'@(ResxWithNoCulture)@(ResxWithCulture)@(NonResxWithNoCulture)@(NonResxWithCulture)'!=''"
42
DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"
45
<Message Text="(in) The names the non-culture .RESX files: '@(ResxWithNoCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
46
<Message Text="(in) The names the culture .RESX files: '@(ResxWithCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
47
<Message Text="(in) The names of the non-culture non-RESX files: '@(NonResxWithNoCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
48
<Message Text="(in) The names of the culture non-RESX files: '@(NonResxWithCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
50
<!-- Create the target resource names for non-culture resx files. -->
51
<CreateVisualBasicManifestResourceName Condition="'@(ResxWithNoCulture)'!=''"
52
ResourceFiles="@(ResxWithNoCulture)"
53
RootNamespace="$(RootNamespace)">
55
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithNoCultureName"/>
57
</CreateVisualBasicManifestResourceName>
58
<Message Text="(out) Manifest-named resx files files with no culture: '@(ManifestResourceWithNoCultureName)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
61
<!-- Create the target resource names for culture resx files. -->
62
<CreateVisualBasicManifestResourceName Condition="'@(ResxWithCulture)'!=''"
63
ResourceFiles="@(ResxWithCulture)"
64
RootNamespace="$(RootNamespace)">
66
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithCultureName"/>
68
</CreateVisualBasicManifestResourceName>
69
<Message Text="(out) Manifest-named resx files with culture: '@(ManifestResourceWithCultureName)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
71
<!-- Create the target resource names for non-culture non-resx files. -->
72
<CreateVisualBasicManifestResourceName Condition="'@(NonResxWithNoCulture)'!=''"
73
ResourceFiles="@(NonResxWithNoCulture)"
74
RootNamespace="$(RootNamespace)">
76
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithNoCulture"/>
78
</CreateVisualBasicManifestResourceName>
79
<Message Text="(out) Manifest-named non-culture non-*.resx files: '@(ManifestNonResxWithNoCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
81
<!-- Create the target resource names for culture non-resx files. -->
82
<CreateVisualBasicManifestResourceName Condition="'@(NonResxWithCulture)'!=''"
83
ResourceFiles="@(NonResxWithCulture)"
84
RootNamespace="$(RootNamespace)">
86
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithCulture"/>
88
</CreateVisualBasicManifestResourceName>
89
<Message Text="(out) Manifest-named culture non-*.resx files: '@(ManifestNonResxWithCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
94
<FinalDefineConstants>CONFIG="$(Configuration)"</FinalDefineConstants>
95
<FinalDefineConstants Condition=" '$(DefineDebug)' == 'true' ">$(FinalDefineConstants),DEBUG=-1</FinalDefineConstants>
96
<FinalDefineConstants Condition=" '$(DefineTrace)' == 'true' ">$(FinalDefineConstants),TRACE=-1</FinalDefineConstants>
97
<FinalDefineConstants Condition=" '$(MyType)' != '' ">$(FinalDefineConstants),_MyType="$(MyType)"</FinalDefineConstants>
98
<FinalDefineConstants Condition=" '$(DefineConstants)' != '' ">$(FinalDefineConstants),$(DefineConstants)</FinalDefineConstants>
100
<NoWarnings Condition=" '$(WarningLevel)' == '0' ">true</NoWarnings>
101
<NoWarnings Condition=" '$(WarningLevel)' == '1' ">false</NoWarnings>
103
<DocFile Condition="'$(DocumentationFile)'!=''">$(IntermediateOutputPath)$(DocumentationFile)</DocFile>
105
<!-- If we're building from inside VisualStudio, we want to always run the Compile target,
106
so that the IDE's compilers have a chance to compile even if MSBuild thinks that the
107
outputs on disk are up-to-date. This is because in the IDE, one does not have to save
108
the source files in the editors to disk before building. This trick forces the Compile
109
target to always run when inside the IDE. -->
110
<NonExistentFile Condition=" '$(BuildingInsideVisualStudio)' == 'true' ">__NonExistentSubDir__\__NonExistentFile__</NonExistentFile>
112
<!-- "None" is not technically a valid DebugType, so we can't pass it in as such
113
to the compiler. So here, we modify the properties so they make sense. -->
114
<DebugSymbols Condition=" '$(DebugType)' == 'none' ">false</DebugSymbols>
115
<DebugType Condition=" '$(DebugType)' == 'none' "></DebugType>
119
<CompileDependsOn>ResolveReferences;ResolveKeySource</CompileDependsOn>
123
Inputs="$(MSBuildAllProjects);
125
@(ManifestResourceWithNoCulture);
127
$(AssemblyOriginatorKeyFile);
128
@(ManifestNonResxWithNoCultureOnDisk);
130
@(CompiledLicenseFile)"
132
@(IntermediateAssembly);
134
DependsOnTargets="$(CompileDependsOn)"
138
AdditionalLibPaths="$(AdditionalLibPaths)"
139
AddModules="@(AddModules)"
140
BaseAddress="$(BaseAddress)"
141
CodePage="$(CodePage)"
142
DebugType="$(DebugType)"
143
DefineConstants="$(FinalDefineConstants)"
144
DelaySign="$(DelaySign)"
145
DisabledWarnings="$(NoWarn)"
146
DocumentationFile="$(DocFile)"
147
EmitDebugInformation="$(DebugSymbols)"
148
ErrorReport="$(ErrorReport)"
149
FileAlignment="$(FileAlignment)"
150
GenerateDocumentation="$(GenerateDocumentation)"
152
KeyContainer="$(KeyContainerName)"
153
KeyFile="$(KeyOriginatorFile)"
154
MainEntryPoint="$(StartupObject)"
156
NoStandardLib="$(NoStdLib)"
157
NoWarnings="$(NoWarnings)"
158
Optimize="$(Optimize)"
159
OptionCompare="$(OptionCompare)"
160
OptionExplicit="$(OptionExplicit)"
161
OptionStrict="$(OptionStrict)"
162
OutputAssembly="@(IntermediateAssembly)"
163
Platform="$(PlatformTarget)"
164
References="@(ReferencePath)"
165
RemoveIntegerChecks="$(RemoveIntegerChecks)"
166
Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
167
ResponseFile="$(CompilerResponseFile)"
168
RootNamespace="$(RootNamespace)"
169
SdkPath="$(FrameworkPathOverride)"
171
TargetType="$(OutputType)"
172
ToolPath="$(VbcToolPath)"
173
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
174
UseHostCompilerIfAvailable="true"
175
Utf8Output="$(Utf8Output)"
176
Verbosity="$(VbcVerbosity)"
177
WarningsAsErrors="$(WarningsAsErrors)"
178
WarningsNotAsErrors="$(WarningsNotAsErrors)"
179
Win32Icon="$(ApplicationIcon)"
180
Win32Resource="$(Win32Resource)"