Options with custom build tools


i'm using new visualstudio 2005 feature allows add resource file (resx) project , uses custom tool autogenerate corresponding c# class accessors resource strings.  however, default seems to create c# class access modifier of "internal".  know resgen tool supports /publicclass options, don't see way tell visualstudio use option when generating source code resx file.  can done?  if so, how?

i've been trying figure out exact same thing.  apparently, can't ide:

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=eaf58466-a6eb-4da9-bf2f-4949b5aff853

i think, however, may possible alter .csproj file behaviour of generateresource build task public class generated.  xml task defined here:

http://msdn2.microsoft.com/en-us/library/ms164295.aspx

the publicclass parameter isn't defined here, if in actual generateresource class definition:

http://msdn2.microsoft.com/en-us/library/microsoft.build.tasks.generateresource.publicclass.aspx

it exist, though it's considered internal infrastructure property.  when in microsoft.common.targets, you'll find definition generateresource:

<generateresource

sources="@(resxwithnoculture)"

usesourcepath="$(usesourcepath)"

references="@(referencepath)"

neverlocktypeassemblies="$(generateresourceneverlocktypeassemblies)"

statefile="$(intermediateoutputpath)$(msbuildprojectfile).generateresource.cache"

outputresources="@(manifestresourcewithnoculturename->'$(intermediateoutputpath)%(identity).resources')"

condition=" '@(resxwithnoculture)' != '' ">

<output taskparameter="outputresources" itemname="manifestresourcewithnoculture"/>

<output taskparameter="fileswritten" itemname="filewrites"/>

</generateresource>

this contains "internal" parameters such "neverlocktypeassemblies", suggests me should possible stick in "publicclass" parameter somehow.  guess if always want public class generated, should able edit above in microsoft.common.targets include parameter , set true.  i'm not sure how how modify .csproj file parameter set there instead.  need read msbuild docs. :)

norman



Archived Forums V  >  Visual C# IDE



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'