You are viewing limited content. For full access, please sign in.

Question

Question

Is there an updated Custom Workflow Activity template for C#?

asked on July 28, 2023

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?

0 0

Answers

APPROVED ANSWER
replied on November 10, 2024

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

1 0
SELECTED ANSWER
replied on July 31, 2023 Show version history

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:

How to fix "microsoft visual studio the system cannot find the file specified (exception form hresult: 0x80070002"when creating a project

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.

2 0

Replies

replied on July 31, 2023

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?

0 0
replied on July 31, 2023

Hi Samuel,

 

I am using VS 2022 and receive the following error upon creating a new project:

0 0
replied on July 31, 2023

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).

 

0 0
replied on July 31, 2023

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?

0 0
SELECTED ANSWER
replied on July 31, 2023 Show version history

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:

How to fix "microsoft visual studio the system cannot find the file specified (exception form hresult: 0x80070002"when creating a project

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.

2 0
replied on July 31, 2023

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>

 

1 0
replied on August 1, 2023

Thank you Samuel!

1 0
replied on May 9, 2024

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.

0 0
replied on November 10, 2024

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.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.