Announcement

As of April 17, 2018, this site is now in read-only mode. To start new Blackbaud Developer’s discussions, you will find Developer Discussions in the Blackbaud CRM Community.

To post or respond to Blackbaud Community discussions, you will have to login using a www.blackbaud.com login. Learn how to login here. If you have questions or need assistance, please email community@blackbaud.com.

1.7k questions

3.2k answers

401 users

Categories

1.7k questions

3.2k answers

401 users

When I click and and click edit data form CLR I get this message

Could not Find file C:\Users\clintf\AddData\Roaming\VisualStudio\10.0\ItemTemplatesCache\Blackbaud AppFx Catalog\EditDataFormTemplateSpec (CLR) CS.zip\EditDataFormClrTemplate.xml

The icon in the add item pop doesn't look normal either.

asked by clintf (191 points)
Can you include your spec XML?  Are there any references to the file you mentioned in your XML or CLR code?
I trying to add a new Edit DataForm for right clicking the project and add. The popup that give me the error is after I click edit dataform CLR and change the name of the xml it will create and then click add. Then I get the error.
This is the spec.xml file located where the errors is pointing too
<AddDataFormTemplateSpec
    xmlns="bb_appfx_adddataformtemplate"
    xmlns:common="bb_appfx_commontypes"
    ID="$guid1$"
    Name="$safeitemname$ Add Data Form"
    Description="REPLACE_WITH_DESCRIPTION"
    Author="$author$"
    DataFormInstanceID="$guid2$"
    RecordType="REPLACE_WITH_RECORD_TYPE"
    common:SecurityUIFolder="REPLACE_WITH_SECURITYUIFOLDER"
    >

    <!-- indicate the server-side catalog implementation that will be used to load and save this form.  This should refer to a class
    that inherits AppCatalog.AppAddDataForm.
     -->
    <CLRDataForm AssemblyName="$rootnamespace$" ClassName="$rootnamespace$.$safeitemname$AddDataForm" />

    <!-- describe the context ID for this form (if applicable).  Note that the RecordIDParameter is not used for CLR forms; the context ID
    can be obtained in the implementing class via Me.ProcessContext.ContextRecordID. -->
    <!--<Context ContextRecordType="REPLACE_WITH_RECORDTYPE" RecordIDParameter="DUMMYVALUE"/>-->

    <!-- describe fields on the form, which correspond to public fields on the class.  Note that system parameters
    like the context ID, DATALOADED, and CURRENTAPPUSERID need not be listed. -->
    <common:FormMetaData FixedDialog="true">
        <common:FormFields>
            <common:FormField FieldID="FIELD1" Caption="Field 1" DataType="String" MaxLength="10" />
            <common:FormField FieldID="FIELD2" Caption="Field 2" DataType="String" MaxLength="20" />
            <common:FormField FieldID="FIELD3" Caption="Field 3" DataType="String" />
        </common:FormFields>

        <!-- indicate the client-side component for the user interface -->
        <common:FormUIComponent FormUIComponentType="CustomComponent">
            <common:CustomComponentID AssemblyName="REPLACE_WITH_ASSEMBLYNAME" ClassName="REPLACE_WITH_FULLCLASSNAME" />
        </common:FormUIComponent>
    </common:FormMetaData>

</AddDataFormTemplateSpec>
Ah, so this is when using the SDK.  Did you check if that file was located in that directory (are any templates there?)?  So you can browse to that path and find the file it is looking for in the error message?
Ya.. I browsed to the location mentioned in the error, I got to the EditDataFormTemplateSpec (CLR) CS.zip folder and the only xml in there is the spec.xml file.
I even renamed spec.xml to the xml mentioned in the error and still didnt work
Can you look at the MyTemplate.vstemplate file in the same directory and see if it looks ok or post it here?  The spec.xml and the template.ico should be referenced in there and (I'm assuming) the file in the error message is the one it tries to generate and not the spec.xml
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
    <TemplateData>
        <DefaultName>EditDataFormTemplateSpec.Edit.xml</DefaultName>
        <Name>Edit Data Form Template Spec (CLR)</Name>
        <Description>Creates a spec for defining a CLR-implemented "edit" data form</Description>
        <ProjectType>CSharp</ProjectType>
        <SortOrder>10</SortOrder>
        <Icon>editdataformtemplatespec.ico</Icon>
    </TemplateData>
    <TemplateContent>
        <References />
        <ProjectItem SubType="" TargetFileName="$fileinputname$.xml" ReplaceParameters="true">EditDataFormClrTemplate.xml</ProjectItem>
        <ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">AppEditDataForm.cs</ProjectItem>
    </TemplateContent>
    <WizardExtension>
        <Assembly>Blackbaud.AppFx.SDKVSWizards, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</Assembly>
        <FullClassName>Blackbaud.AppFx.SDKVSWizards.CatalogItemWizard</FullClassName>
    </WizardExtension>
</VSTemplate>

MyTemplate.vstemplate
Try this: Change 'editdataformtemplatespec.ico' to 'template.ico' and change 'EditDataFormClrTemplate.xml' to 'spec.xml' assuming those are the items in that folder.  You may need to restart visual studio as well
Sweet.. It let me add it to the project.. Thank for the help Daniel.

1 Answer

Just documenting this for future reference. You may want to let SDK support know about this; I'm not sure if the new C# templates were released incorrectly or if this was some sort of SDK installer issue.

Check the template file in the directory of the error: should be called MyTemplate.vstemplate
Make sure the references in this file point to valid items in the same directory:
Icon should be the .ico file (my version is template.ico)
ProjectItem TargetFileName="...cs"... should refere to the .cs file (my version is AppEditDataForm.cs)
ProjectItem TargetFileName="...xml" should refer to the .xml file (my version is spec.xml)

answered by danielcooke (3.5k points)
...