~nunit-core/nunitv2/2.5

« back to all changes in this revision

Viewing changes to tools/MutantBuild/Microsoft.VisualBasic.targets

  • Committer: jcansdale
  • Date: 2004-10-09 13:02:14 UTC
  • Revision ID: vcs-imports@canonical.com-20041009130214-5liblibdfltxqlwa
Tool for building VS2003 projects with MSBuild.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
2
 
 
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"/>    
 
5
    <PropertyGroup>
 
6
        <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildBinPath)\Microsoft.VisualBasic.targets</MSBuildAllProjects>
 
7
        <DefaultLanguageSourceExtension>.vb</DefaultLanguageSourceExtension>
 
8
        <Language>VB</Language>
 
9
    </PropertyGroup>
 
10
 
 
11
    <!--
 
12
    The CreateManifestResourceNames target create the manifest resource names from the .RESX
 
13
    files.
 
14
 
 
15
        [IN]
 
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).
 
20
 
 
21
        [OUT]
 
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.
 
26
 
 
27
    For VB applications the transformation is like:
 
28
 
 
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
 
33
 
 
34
    For other project systems, this transformation may be different.
 
35
    -->
 
36
    <PropertyGroup>
 
37
        <CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
 
38
    </PropertyGroup>
 
39
    <Target
 
40
        Name="CreateManifestResourceNames"
 
41
        Condition="'@(ResxWithNoCulture)@(ResxWithCulture)@(NonResxWithNoCulture)@(NonResxWithCulture)'!=''"
 
42
        DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"
 
43
        >
 
44
 
 
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'"/>
 
49
 
 
50
        <!-- Create the target resource names for non-culture resx files. -->
 
51
        <CreateVisualBasicManifestResourceName Condition="'@(ResxWithNoCulture)'!=''"
 
52
              ResourceFiles="@(ResxWithNoCulture)"
 
53
              RootNamespace="$(RootNamespace)">
 
54
 
 
55
            <Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithNoCultureName"/>
 
56
 
 
57
        </CreateVisualBasicManifestResourceName>
 
58
        <Message Text="(out) Manifest-named resx files files with no culture: '@(ManifestResourceWithNoCultureName)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
 
59
 
 
60
 
 
61
        <!-- Create the target resource names for culture resx files. -->
 
62
        <CreateVisualBasicManifestResourceName  Condition="'@(ResxWithCulture)'!=''"
 
63
              ResourceFiles="@(ResxWithCulture)"
 
64
              RootNamespace="$(RootNamespace)">
 
65
 
 
66
            <Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithCultureName"/>
 
67
 
 
68
        </CreateVisualBasicManifestResourceName>
 
69
        <Message Text="(out) Manifest-named resx files with culture: '@(ManifestResourceWithCultureName)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
 
70
 
 
71
        <!-- Create the target resource names for non-culture non-resx files. -->
 
72
        <CreateVisualBasicManifestResourceName  Condition="'@(NonResxWithNoCulture)'!=''"
 
73
              ResourceFiles="@(NonResxWithNoCulture)"
 
74
              RootNamespace="$(RootNamespace)">
 
75
 
 
76
            <Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithNoCulture"/>
 
77
 
 
78
        </CreateVisualBasicManifestResourceName>
 
79
        <Message Text="(out) Manifest-named non-culture non-*.resx files: '@(ManifestNonResxWithNoCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
 
80
 
 
81
        <!-- Create the target resource names for culture non-resx files. -->
 
82
        <CreateVisualBasicManifestResourceName  Condition="'@(NonResxWithCulture)'!=''"
 
83
              ResourceFiles="@(NonResxWithCulture)"
 
84
              RootNamespace="$(RootNamespace)">
 
85
 
 
86
            <Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithCulture"/>
 
87
 
 
88
        </CreateVisualBasicManifestResourceName>
 
89
        <Message Text="(out) Manifest-named culture non-*.resx files: '@(ManifestNonResxWithCulture)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
 
90
 
 
91
    </Target>
 
92
 
 
93
    <PropertyGroup>
 
94
        <FinalDefineConstants>CONFIG=&quot;$(Configuration)&quot;</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=&quot;$(MyType)&quot;</FinalDefineConstants>
 
98
        <FinalDefineConstants Condition=" '$(DefineConstants)' != '' ">$(FinalDefineConstants),$(DefineConstants)</FinalDefineConstants>
 
99
 
 
100
        <NoWarnings Condition=" '$(WarningLevel)' == '0' ">true</NoWarnings>
 
101
        <NoWarnings Condition=" '$(WarningLevel)' == '1' ">false</NoWarnings>
 
102
 
 
103
        <DocFile Condition="'$(DocumentationFile)'!=''">$(IntermediateOutputPath)$(DocumentationFile)</DocFile>
 
104
 
 
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>
 
111
 
 
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>
 
116
    </PropertyGroup>
 
117
 
 
118
    <PropertyGroup>
 
119
        <CompileDependsOn>ResolveReferences;ResolveKeySource</CompileDependsOn>
 
120
    </PropertyGroup>
 
121
    <Target
 
122
        Name="Compile"
 
123
        Inputs="$(MSBuildAllProjects);
 
124
                @(Compile);
 
125
                @(ManifestResourceWithNoCulture);
 
126
                $(ApplicationIcon);
 
127
                $(AssemblyOriginatorKeyFile);
 
128
                @(ManifestNonResxWithNoCultureOnDisk);
 
129
                @(ReferencePath);
 
130
                @(CompiledLicenseFile)"
 
131
        Outputs="$(DocFile);
 
132
                 @(IntermediateAssembly);
 
133
                 $(NonExistentFile)"
 
134
        DependsOnTargets="$(CompileDependsOn)"
 
135
    >
 
136
 
 
137
        <Vbc
 
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)"
 
151
              Imports="@(Import)"
 
152
              KeyContainer="$(KeyContainerName)"
 
153
              KeyFile="$(KeyOriginatorFile)"
 
154
              MainEntryPoint="$(StartupObject)"
 
155
              NoConfig="true"
 
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)"
 
170
              Sources="@(Compile)"
 
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)"
 
181
              />
 
182
 
 
183
    </Target>
 
184
 
 
185
 
 
186
</Project>