Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VS Shell: Compiling VSCT file for multiple languages

$
0
0

I am starting to implement multiple languages in my VS2012 Isolated Shell application. I have discovered that I need to add language-specific settings to my project's vsct file for each language like this:

        <Strings language="en-us">
          <ButtonText>Library</ButtonText>
          <CommandName>Library</CommandName>
        </Strings>
        <Strings language="de-de">
          <ButtonText>Library (DE)</ButtonText>
          <CommandName>Library (DE)</CommandName>
        </Strings>

and then compile the vsct file using vsct.exe passing the appropriate language setting using the /L command-line argument.

To test this out, I was using the command window. After resolving a problem regarding the include files (haad to specify the path using the -I arg), I still get 2 errors in my vsct file. The involve the context setting in these statments:

  <VisibilityConstraints>
    <VisibilityItem guid="guidTestRunCmdSet" id="TestRunMenu" context="UICONTEXT_SolutionExists" />
    <VisibilityItem guid="guidCmdSet" id="cmdidContinueLine" context="UICONTEXT_SolutionExists" />
  </VisibilityConstraints>

It seems UICONTEXT_SolutionExists is not valid. I have verified this context exists in the included vsshlids.h file, but is inside a #ifdef __CTC__ block. I cannot find anywhere that this macro is defined in my project, so I am at a loss as to why my entire project builds fine in VS yet I cannot compile the vsct file from a command line.

So, how do I successfully build this file from the command line, and then can I somehow add statements to my csproj file to automate the building of this file for each language I need to support? Is there some way to specify command-line arguments for the vsct compiler in this block?

    <VSCTCompile Include="MyProject.vsct">
      <ResourceName>Menus.ctmenu</ResourceName>
      <SubType>Designer</SubType>
    </VSCTCompile>


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>