.ribbon error "cannot find the file specified"

Mar 4, 2011 at 5:31 PM

Hi all,

im getting these two errors

Error 1 Custom tool error: Generation failed. Error: rc.exe failed to generate binary .res file! \\domain.local\share\Web Server\Application\App\App1\RibbonGen.xml 1 1 App1
Error 2 Error reading resource file \\domain.local\share\Web Server\Application\App\App1\RibbonGen.ribbon' -- 'The system cannot find the file specified. ' App1

and the ribbonGen.ribbon file has triangle exclamation on it, but the file is there if i browse to directory :S

when i first created the file it generated fine, but o copied and pasted some xml from the sample files saved it then the .ribbon file goes caput :S

any ideas?
is it becuase my project is on a share?

Thanks 

Sep 21, 2012 at 10:46 PM

Make sure to call the Ribbon's xml definition file "RibbonMarkup.xml" (don't forget to correct the ResourceName property after renaming your existing file). It looks like the RibbonGenerator tool is looking hard coded for a RibbonMarkup.xml, nothing else ("Ribbon.xml" for example didn't work for me and caused your errors, and your files name is also different from it with "RibbonGen").

May 30, 2013 at 3:24 PM
Hi Everyone,

Sorry to bring this post back from the dead, but it seems I am having the same issue. When I remove certain sections of the code I made, the RibbonMarkup..ribbon file starts working again, but if i have my full XML code in the file, the .ribbon file does not get generated. I am running Visual Studio 2010 Ultimate on Windows 8 Pro x64. Please Help! I have re installed the generator 6 times and nothing has helped. If you want my full XML code, I can post it. As said before, I used code from the samples. I did not directly copy and paste the code though, I printed the code out and typed it in. Please Help!!
May 30, 2013 at 6:29 PM
Are you sure the XML code which you add back does not have any errors? That was always freaking me out, a very tiny error causing the generator to fail at creating the RibbonMarkup. Also make sure you do not reuse same IDs or do some other logical errors in the (complex!) ribbon XML.
You can post it, maybe I can review it, even though I didn't work with the Ribbon since September :-)
May 30, 2013 at 6:58 PM
Hi PacMani,

I have since resolved any errors occurring with the Application Menu Area, but any issue(s) still persist in the Ribbon Tabs area/section. In the application menu, it just ended up being a control that was incompatible with its parent container. I am assuming it is the same for the Ribbon Tabs area, but I have yet to find where it is happening. If it is not too much trouble for you to review my <Ribbon.Tabs> area, that would be great. As previously stated though, I have resolved issues within the application menu region. My code is given in whole below.
<?xml version='1.0' encoding='utf-8'?>
<Application xmlns='http://schemas.microsoft.com/windows/2009/Ribbon'>
  <Application.Commands>
</Application.Commands>
    <Application.Views>
    <Ribbon>

      <!--BEGIN SIZE DEFINITIONS-->
      <Ribbon.SizeDefinitions>
        <SizeDefinition Name="ParagraphLayout">
          <ControlNameMap>
            <ControlNameDefinition Name="button1" />
            <ControlNameDefinition Name="button2" />
            <ControlNameDefinition Name="button3" />
            <ControlNameDefinition Name="button4" />
            <ControlNameDefinition Name="button5" />
            <ControlNameDefinition Name="button6" />
            <ControlNameDefinition Name="button7" />
            <ControlNameDefinition Name="button8" />
            <ControlNameDefinition Name="button9" />
          </ControlNameMap>
          <GroupSizeDefinition Size="Large">
            <Row>
              <ControlGroup>
                <ControlSizeDefinition ControlName="button1" IsLabelVisible="false" />
                <ControlSizeDefinition ControlName="button2" IsLabelVisible="false" />
              </ControlGroup>
              <ControlGroup>
                <ControlSizeDefinition ControlName="button3" IsLabelVisible="false" />
              </ControlGroup>
              <ControlGroup>
                <ControlSizeDefinition ControlName="button4" IsLabelVisible="false" />
              </ControlGroup>
            </Row>
            <Row>
              <ControlGroup>
                <ControlSizeDefinition ControlName="button5" IsLabelVisible="false" />
                <ControlSizeDefinition ControlName="button6" IsLabelVisible="false" />
                <ControlSizeDefinition ControlName="button7" IsLabelVisible="false" />
                <ControlSizeDefinition ControlName="button8" IsLabelVisible="false" />
              </ControlGroup>
              <ControlGroup>
                <ControlSizeDefinition ControlName="button9" IsLabelVisible="false" />
              </ControlGroup>
            </Row>
          </GroupSizeDefinition>
        </SizeDefinition>
      </Ribbon.SizeDefinitions>
      <!--END SIZE DEFINITIONS-->
      
      <!--BEGIN HELP BUTTON DECLARATION-->
      <Ribbon.HelpButton>
        <HelpButton CommandName='cmdHelpButton' />
      </Ribbon.HelpButton>
      <!--END HELP BUTTON DECLARATION-->
      
      <!--BEGIN APPLICATION MENU CONTROL DECLARATIONS AND POSITIONING-->
      <Ribbon.ApplicationMenu>
        <ApplicationMenu>
          
          <MenuGroup CommandName='cmdMenuGroupFile'>
            <Button CommandName='cmdButtonNew' />
            <Button CommandName='cmdButtonOpen' />
            <Button CommandName='cmdButtonSave' />
            <Button CommandName='cmdButtonSaveAs' />
          </MenuGroup>

          <MenuGroup CommandName='cmdMenuGroupPrinting'>
            <Button CommandName='cmdButtonPrint' />
            <Button CommandName='cmdButtonPrintPreview' />
            <SplitButton>
              <SplitButton.ButtonItem>
                <Button CommandName='cmdButtonPageSetup' />
              </SplitButton.ButtonItem>
              <SplitButton.MenuGroups>
                <MenuGroup Class='MajorItems'>
                  <Button CommandName='cmdButtonPageSetup2' />
                  <ComboBox CommandName="cmdPageSizeComboBox" IsAutoCompleteEnabled="true" IsEditable="false" ResizeType="VerticalResize" />
                  <ComboBox CommandName="cmdPageOrientationComboBox" IsAutoCompleteEnabled="true" IsEditable="false" />
                </MenuGroup>
              </SplitButton.MenuGroups>
            </SplitButton>
          </MenuGroup>

          <MenuGroup CommandName='cmdMenuGroupSocial'>
            <DropDownButton CommandName='cmdDropDownButtonSocial'>
              <MenuGroup Class='MajorItems'>
                <Button CommandName='cmdButtonFacebook' />
                <Button CommandName='cmdButtonTwitter' />
                <Button CommandName='cmdButtonMySpace' />
                <Button CommandName='cmdButtonPintrest' />
                <Button CommandName='cmdButtonEmail' />
              </MenuGroup>
            </DropDownButton>
          </MenuGroup>

          <MenuGroup CommandName='cmdMenuExit'>
            <Button CommandName='cmdButtonExit' />
          </MenuGroup>
        </ApplicationMenu>
      </Ribbon.ApplicationMenu>
      <!--END APPLICATION MENU CONTROL DECLARATIONS AND POSITIONING-->
      
      <!--BEGIN RIBBON TABS (WITH CONTROLS) DECLARTION AND POSITIONING-->
      <Ribbon.Tabs>
        <Tab CommandName='cmdTabMain'>
          
          <Group CommandName="cmdGroupRichFont" SizeDefinition="OneFontControl">
            <FontControl CommandName="cmdRichFont" FontType="RichFont" />
          </Group>
          
          <Group CommandName="cmdGroupParagraphStyle" SizeDefinition="ParagraphLayout">
            <Button CommandName="cmdDecreaseIndent" />
            <Button CommandName="cmdIncreaseIndent" />
            <SplitButton>
              <Button CommandName="cmdStartList" />
            </SplitButton>
            <DropDownButton CommandName="cmdLineSpacing">
              <Button />
            </DropDownButton>
            <Button CommandName="cmdAlignLeft" />
            <Button CommandName="cmdAlignCenter" />
            <Button CommandName="cmdAlignRight" />
            <Button CommandName="cmdJustify" />
            <Button CommandName="cmdParagraph" />
          </Group>
          
          <Group CommandName="cmdGroupClipboardTools" SizeDefinition ="ThreeButtons">
            <Button CommandName="cmdButtonCopy" />
            <Button CommandName="cmdButtonCut" />
            <Button CommandName="cmdButtonPaste" />
          </Group>
          
          <Group CommandName="cmdGroupQuickFix" SizeDefinition="TwoButtons">
            <Button CommandName="cmdButtonUndo" />
            <Button CommandName="cmdButtonRedo" />
          </Group>
          
          <Group CommandName="cmdGroupEvalTools" SizeDefinition="OneButton">
            <Button CommandName="cmdButtonReportProblem" />
          </Group>
        </Tab>
        
        <Tab CommandName="cmdTabInsert">
          <Group CommandName="cmdGroupImageCenter" SizeDefinition="OneButton">
            <Button CommandName="cmdButtonImportPicture" />
          </Group>
          
          <Group CommandName="cmdGroupDocuments" SizeDefinition="TwoButtons">
            <Button CommandName="cmdButtonImportWholeDocument" />
            <Button CommandName="cmdButtonImportDocumentText" />
          </Group>
          
          <Group CommandName="cmdGroupEnhancedText" SizeDefinition="ThreeButtons">
            <Button CommandName="cmdButtonAddHyperlink" />
            <Button CommandName="cmdButtonInsertTime" />
            <Button CommandName="cmdButtonInsertDate" />
          </Group>
        </Tab>
        
        <Tab CommandName="cmdTabEdit">
          <Group CommandName="cmdGroupFind">
            <ComboBox CommandName="cmdFindSearchTermComboBox" IsAutoCompleteEnabled="true" IsEditable="true" />
            <CheckBox CommandName="cmdCheckBox" />
            <Button CommandName="cmdButtonFind" />
            <Button CommandName="cmdButtonFindNext" />
          </Group>
          <Group CommandName="cmdGroupReplace">
            <ComboBox CommandName="cmdReplaceInTermComboBox" IsAutoCompleteEnabled="true" IsEditable="true" />
            <ComboBox CommandName="cmdRepalceOutTermComboBox" IsAutoCompleteEnabled="true" IsEditable="true" />
            <CheckBox CommandName="cmdCheckBox" />
            <Button CommandName="cmdButtonReplace" />
            <Button CommandName="cmdButtonReplaceAll" />
          </Group>
          <Group CommandName="cmdGroupSelect">
            <Button CommandName="cmdButtonSelect" />
            <Button CommandName="cmdButtonSelectAll" />"
          </Group>
        </Tab>
        <Tab CommandName="cmdTabLayout">
          <Group CommandName="cmdGroupPageDesign">
            <DropDownColorPicker CommandName="cmdDropDownColorPickerStandardColors"
                                 ColorTemplate="StandardColors"/>
            <ToggleButton CommandName="cmdToggleButtonPageBorder" 
                          ApplicationDefaults.IsChecked="false"/>
            
          </Group>
          <Group CommandName="cmdGroupPageLayout">
            <ComboBox CommandName="cmdPageSizeComboBox2" IsAutoCompleteEnabled="true" IsEditable="false" ResizeType="VerticalResize" />
            <ComboBox CommandName="cmdPageOrientationComboBox2" IsAutoCompleteEnabled="true" IsEditable="false" />
          </Group>
        </Tab>
      </Ribbon.Tabs>
      <!--END RIBBON TABS (WITH CONTROLS) DECLARTION AND POSITIONING-->
    </Ribbon>
  </Application.Views>
</Application>
May 30, 2013 at 9:05 PM
I coudln't find any errors at first sight. I'd recommend removing every group and adding it back one by one and compile between the steps.
May 31, 2013 at 12:15 PM
Thanks so much for your hell! I took your advice and narrowed the issue down to my edit tab with all the checkboxes and combo boxes and more. Thanks so much PacMani!

--
Alex Hawk
Sent from my iPhone

May 31, 2013 at 4:39 PM
No problem. Just because I'm curious, what was the error exactly?
May 31, 2013 at 7:14 PM
It was an error basically stating that uicc.exe could not generate the ribbon file.

--
Alex Hawk
Sent from my iPhone


May 31, 2013 at 7:15 PM
Yeah that's clear :D I thought it was a syntax error in the RibbonMarkup.xml especially
May 31, 2013 at 7:19 PM
Oh no. The XML file and the log file were still there, but the .ribbon file would not generate and that error appeared. I hope this helps other users.

--
Alex Hawk
Sent from my iPhone