Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r511 - trunk/Source: . MSBuild.Community.Tasks MSBuild.Community.Tasks.Tests

msbuildtasks
Discussion topic

Back to topic list

svn commit: r511 - trunk/Source: . MSBuild.Community.Tasks MSBuild.Community.Tasks.Tests

Author pwelter34
Full name Paul Welter
Date 2010-11-30 08:53:47 PST
Message Author: pwelter34
Date: 2010-11-30 08:53:47-0800
New Revision: 511

Modified:
   trunk/Source/MSBuild​.Community.Tasks.Tes​ts/MSBuild.Community​.Tasks.Tests.csproj
   trunk/Source/MSBuild​.Community.Tasks/Ass​emblyInfo.cs
   trunk/Source/Task.proj

Log:
- add UltimateResourceFall​backLocation to AssemblyInfo.cs

Modified: trunk/Source/MSBuild​.Community.Tasks.Tes​ts/MSBuild.Community​.Tasks.Tests.csproj
Url: http://msbuildtasks.​tigris.org/source/br​owse/msbuildtasks/tr​unk/Source/MSBuild.C​ommunity.Tasks.Tests​/MSBuild.Community.T​asks.Tests.csproj?vi​ew=diff&pathrev=​511&r1=510&r​2=511
====================​====================​====================​==================
--- trunk/Source/MSBuild​.Community.Tasks.Tes​ts/MSBuild.Community​.Tasks.Tests.csproj (original)
+++ trunk/Source/MSBuild​.Community.Tasks.Tes​ts/MSBuild.Community​.Tasks.Tests.csproj 2010-11-30 08:53:47-0800
@@ -153,7 +153,9 @@
     <None Include="ILMerge\IL​MergeTest.proj" />
     <None Include="Install\In​stallTest.proj" />
     <None Include="JavaScript​JavaScriptTest.proj​" />
- <None Include="Regex\RegexTest.proj" />
+ <None Include="Regex\Rege​xTest.proj">
+ <SubType>Desig​ner</SubType>
+ </None>
     <None Include="Solution\G​etSolutionProjectsTe​st.proj" />
     <None Include="SqlServer\​createDb.sql.templat​e" />
     <None Include="SqlServer\dropDb.sql" />

Modified: trunk/Source/MSBuild​.Community.Tasks/Ass​emblyInfo.cs
Url: http://msbuildtasks.​tigris.org/source/br​owse/msbuildtasks/tr​unk/Source/MSBuild.C​ommunity.Tasks/Assem​blyInfo.cs?view=diff​&pathrev=511​&r1=510&r2=511
====================​====================​====================​==================
--- trunk/Source/MSBuild​.Community.Tasks/Ass​emblyInfo.cs (original)
+++ trunk/Source/MSBuild​.Community.Tasks/Ass​emblyInfo.cs 2010-11-30 08:53:47-0800
@@ -187,10 +187,7 @@
         #region Fields
         private readonly Dictionary<string, string> _attributes;
         private readonly string[] _imports;
- private bool _generateClass;
- private string _languageCode;
         private string _outputFile;
- private string _codeLanguage;
 
         #endregion Fields
 
@@ -214,11 +211,7 @@
         /// </summary>
         /// <value>The code language.</value>
         [Required]
- public string CodeLanguage
- {
- get { return _codeLanguage; }
- set { _codeLanguage = value; }
- }
+ public string CodeLanguage { get; set; }
 
         /// <summary>
         /// Gets or sets a value indicating whether [COMVisible].
@@ -408,21 +401,19 @@
         /// <summary>
         /// Gets or sets a value indicating whether to generate the ThisAssmebly class.
         /// </summary>
- public bool GenerateClass
- {
- get { return _generateClass; }
- set { _generateClass = value; }
- }
+ public bool GenerateClass { get; set; }
 
         /// <summary>
         /// Gets or sets the neutral language which is used as a fallback language configuration
         /// if the locale on the computer isn't supported. Example is setting this to "en-US".
         /// </summary>
- public string NeutralResourcesLanguage
- {
- get { return _languageCode; }
- set { _languageCode = value; }
- }
+ public string NeutralResourcesLanguage { get; set; }
+
+ /// <summary>
+ /// Gets or sets the ultimate resource fallback location.
+ /// </summary>
+ /// <value>The ultimate resource fallback location.</value>
+ public string UltimateResourceFall​backLocation { get; set; }
 
         /// <summary>
         /// Makes it possible to make certain assemblies able to use constructs marked as internal.
@@ -495,12 +486,12 @@
         #region Private Methods
         private void GenerateFile(TextWriter writer)
         {
- _codeLanguage = (_codeLanguage ?? String.Empty).ToLower();
+ CodeLanguage = (CodeLanguage ?? String.Empty).ToLower();
 
             // Get the chosen provider and rename the output file's extension
- CodeDomProvider provider = GetProviderAndSetExt​ension(_codeLanguage​, ref _outputFile);
+ CodeDomProvider provider = GetProviderAndSetExt​ension(CodeLanguage,​ ref _outputFile);
 
- SetDefaultsForLangua​ge(_codeLanguage);
+ SetDefaultsForLangua​ge(CodeLanguage);
 
             CodeCompileUnit codeCompileUnit = new CodeCompileUnit();
             CodeNamespace codeNamespace = new CodeNamespace();
@@ -541,14 +532,14 @@
             }
 
             // Add an assembly language code attribute to determine the neutral culture
- if (_languageCode != null)
+ if (NeutralResourcesLanguage != null)
             {
                 AddAssemblyLanguageC​odeAttribute(codeCom​pileUnit);
             }
 
             // Generate an internally accessible class which has the version information
             // available as properties
- if (_generateClass)
+ if (GenerateClass)
             {
                 GenerateThisAssembly​Class(codeNamespace)​;
             }
@@ -564,7 +555,7 @@
             if (!_codeLangMapping.T​ryGetValue(codeLangu​age, out codeLang))
             {
                 throw new NotSupportedException("The specified code language is not supported: '" +
- _codeLanguage +
+ CodeLanguage +
                                                 "'");
             }
 
@@ -713,10 +704,13 @@
             var codeAttributeDeclaration = new CodeAttributeDeclara​tion("NeutralResourc​esLanguage");
             codeAttributeDeclara​tion.Arguments.Add(
                 new CodeAttributeArgument(
- new CodePrimitiveExpress​ion(_languageCode)))​;
- codeAttributeDeclara​tion.Arguments.Add(
- new CodeAttributeArgument(
- new CodeTypeReferenceExp​ression("System.Reso​urces.UltimateResour​ceFallbackLocation.S​atellite")));
+ new CodePrimitiveExpress​ion(NeutralResources​Language)));
+
+ if (! string.IsNullOrEmpty​(UltimateResourceFal​lbackLocation))
+ codeAttributeDeclara​tion.Arguments.Add(
+ new CodeAttributeArgument(
+ new CodeTypeReferenceExp​ression(UltimateReso​urceFallbackLocation​)));
+
             codeCompileUnit.Asse​mblyCustomAttributes​.Add(codeAttributeDe​claration);
         }
 

Modified: trunk/Source/Task.proj
Url: http://msbuildtasks.​tigris.org/source/br​owse/msbuildtasks/tr​unk/Source/Task.proj​?view=diff&pathr​ev=511&r1=510​&r2=511
====================​====================​====================​==================
--- trunk/Source/Task.proj (original)
+++ trunk/Source/Task.proj 2010-11-30 08:53:47-0800
@@ -22,7 +22,7 @@
             AssemblyFileVersion=​"1.0.0.0"/>
 
     <AssemblyInfo CodeLanguage="CS"
- OutputFile="$(MSBui​ldProjectDirectory)​Test\GlobalInfo.cs​"
+ OutputFile="$(MSBui​ldProjectDirectory)​Test\GlobalInfo2.c​s"
             GenerateClass="true"
       AssemblyTitle="Assem​blyInfoTask"
             AssemblyDescription=​"AssemblyInfo Description"
@@ -35,7 +35,26 @@
             CLSCompliant="true"
             Guid="d038566a-1937-​478a-b5c5-b79c4afb25​3d"
             AssemblyVersion="1.0.0.0"
- AssemblyFileVersion="1.0.0.0" />
+ AssemblyFileVersion="1.0.0.0"
+ NeutralResourcesLang​uage="en-US"/>
+
+ <AssemblyInfo CodeLanguage="CS"
+ OutputFile="$(MSBui​ldProjectDirectory)​Test\GlobalInfo3.c​s"
+ GenerateClass="true"
+ AssemblyTitle="Assem​blyInfoTask"
+ AssemblyDescription=​"AssemblyInfo Description"
+ AssemblyConfiguration=""
+ AssemblyCompany="Company Name, LLC"
+ AssemblyProduct="Ass​emblyInfoTask"
+ AssemblyCopyright="Copyright (c) Company Name, LLC 2005"
+ AssemblyTrademark=""
+ ComVisible="false"
+ CLSCompliant="true"
+ Guid="d038566a-1937-​478a-b5c5-b79c4afb25​3d"
+ AssemblyVersion="1.0.0.0"
+ AssemblyFileVersion="1.0.0.0"
+ NeutralResourcesLang​uage="en-US"
+ UltimateResourceFall​backLocation="System​.Resources.UltimateR​esourceFallbackLocat​ion.MainAssembly" />
 
   </Target>

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r511 - trunk/Source: . MSBuild.Community.Tasks MSBuild.Community.Tasks.Tests pwelter34 Paul Welter 2010-11-30 08:53:47 PST
Messages per page: