I'm having some trouble opening the one that is in the installation folder. By any chance is there an updated template somewhere I can use instead?
Question
Question
Is there an updated Custom Workflow Activity template for C#?
Answers
Hi Michelle,
Updated code samples and templates for the Workflow SDK and Activity Proxy generator and add Visual Studio 2022 Templates has been fixed on Workflow 12. You can find it in "C:\Program Files\Laserfiche\Workflow\SDK\Templates\Laserfiche Workflow Custom Activity 2022.vsix" and double-click it to install, then you should be able to use them in VS 2022.
You can see other changes from: Laserfiche 12 Changelog
Get Laserfiche Workflow 12 package from: Laserfiche 12 - Downloads
I just reproduced the issue in Visual Studio 2022 with the "Laserfiche Workflow Customer Activity CS/VS.zip" template packages included with Workflow 11 Update 3. Not sure why, but we're likely running into some variant of this:
What worked for me was copying the "Laserfiche Workflow Customer Activity CS.zip" template package to my desired project location, extracting it into its own directory, and then using Visual Studio 2022 to open the CustomActivity.csproj file.
If you get a prompt about updating the target to .NET Framework 4.8, select the recommended option to update and Continue.
Then rename things as desired. All the template (MyTemplate.vstemplate) appears to be doing is renaming CustomActivity.csproj, updating the AssemblyInfo.cs file path, and renaming SampleCustomActivity.cs. You can easily do that yourself.
Replies
Hi Michelle,
Can you expand on the issue(s) you're having opening the included one?
What exact version of Workflow? What error messages are you receiving and where?
Hi Samuel,
I am using VS 2022 and receive the following error upon creating a new project:
Workflow 11 Update 2 (and above) contain updated templates.
- Updates to the Workflow SDK have been made to support newer versions of Visual Studio.
Please ensure you're using the templates from Workflow 11 Update 2 or above (latest release is Update 3).
Hi Samuel,
I updated to version 11.0.2306.898 but still receiving the same error. Do I need to do anything else after updating?
I just reproduced the issue in Visual Studio 2022 with the "Laserfiche Workflow Customer Activity CS/VS.zip" template packages included with Workflow 11 Update 3. Not sure why, but we're likely running into some variant of this:
What worked for me was copying the "Laserfiche Workflow Customer Activity CS.zip" template package to my desired project location, extracting it into its own directory, and then using Visual Studio 2022 to open the CustomActivity.csproj file.
If you get a prompt about updating the target to .NET Framework 4.8, select the recommended option to update and Continue.
Then rename things as desired. All the template (MyTemplate.vstemplate) appears to be doing is renaming CustomActivity.csproj, updating the AssemblyInfo.cs file path, and renaming SampleCustomActivity.cs. You can easily do that yourself.
All the template (MyTemplate.vstemplate) appears to be doing is renaming CustomActivity.csproj, updating the AssemblyInfo.cs file path, and renaming SampleCustomActivity.cs. You can do that all yourself.
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project"> <TemplateData> <Name>Laserfiche Workflow Custom Activity</Name> <Description>Template with a built-in wizard for designing a custom activity for use with Laserfiche Workflow.</Description> <ProjectType>CSharp</ProjectType> <ProjectSubType> </ProjectSubType> <SortOrder>1000</SortOrder> <CreateNewFolder>true</CreateNewFolder> <DefaultName>CustomActivity</DefaultName> <ProvideDefaultName>true</ProvideDefaultName> <LocationField>Enabled</LocationField> <EnableLocationBrowseButton>true</EnableLocationBrowseButton> <Icon>__TemplateIcon.png</Icon> <PreviewImage>__PreviewImage.png</PreviewImage> </TemplateData> <TemplateContent> <Project TargetFileName="CustomActivity.csproj" File="CustomActivity.csproj" ReplaceParameters="true"> <Folder Name="Properties" TargetFolderName="Properties"> <ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem> </Folder> <ProjectItem ReplaceParameters="true" TargetFileName="SampleCustomActivity.cs" OpenInEditor="true">SampleCustomActivity.cs</ProjectItem> </Project> </TemplateContent> <WizardExtension> <Assembly>Laserfiche.Workflow.CustomActivityTemplateWizard, Version=8.3.0.0, Culture=Neutral, PublicKeyToken=cf0d5d7ae011e683</Assembly> <FullClassName>Laserfiche.Workflow.CustomActivityTemplateWizard.TemplateWizard</FullClassName> </WizardExtension> <WizardData Name="VBorCS">CS</WizardData> </VSTemplate>
Thank you Samuel!
Hi Samuel,
Are there any plans to provide a permanent fix for this? It's been almost a year and I'm running the latest version of Workflow (11.0.2306.898). I'm getting the error you quoted when attempting to start a new project using the included template.
Hi Jonathan,
Updated code samples and templates for the Workflow SDK and Activity Proxy generator and add Visual Studio 2022 Templates has been fixed on Workflow 12. Please check my reply below.