PlugIn Build folder Error

I'm in the middle of upgrading a PlugIn from 2017 to 2021.

This one works well in version2017.
When I finish upgrading to version2021
And Build it, it emits following Error:

Please specify a deployment path in "PluginDeploymentPath" property
(e.g Studio 2019 -> C:\Users\[currentUser]\AppData\Roaming\SDL\SDL Trados Studio\15\Plugins)

Fortunately, I have assigned my proper build location already, like this.

Poperties pane > Build > Output > output path:
C:\Users\user\AppData\Roaming\SDL\SDL Trados Studio\16\Plugins\Packages\

How can I solve this Error ?
Thanks..



added screenshot
[edited by: Kelly Edward at 5:45 PM (GMT 1) on 16 Apr 2022]
Parents Reply Children
  • Clearly you are doing something wrong here.  I'm not a developer, but perhaps you should take the advice and review some existing code that works, like this one:

    https://github.com/RWS/Sdl-Community/blob/master/DSI%20Viewer/Sdl.Community.SdiViewer/Sdl.Community.DsiViewer.csproj

    I put it here as well in case it's easier:

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <PropertyGroup>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
        <ProductVersion>8.0.30703</ProductVersion>
        <SchemaVersion>2.0</SchemaVersion>
        <ProjectGuid>{35B4E386-002D-41BF-8B20-43E758B8250A}</ProjectGuid>
        <OutputType>Library</OutputType>
        <AppDesignerFolder>Properties</AppDesignerFolder>
        <RootNamespace>Sdl.Community.DsiViewer</RootNamespace>
        <AssemblyName>Sdl.Community.DsiViewer</AssemblyName>
        <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
        <LangVersion>latest</LangVersion>
        <FileAlignment>512</FileAlignment>
        <XamlDebuggingInformation>True</XamlDebuggingInformation>
        <PluginDeploymentPath>$(AppData)\Trados\Trados Studio\17\Plugins</PluginDeploymentPath>
        <NuGetPackageImportStamp>
        </NuGetPackageImportStamp>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <Optimize>false</Optimize>
        <OutputPath>bin\Debug\</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DebugType>pdbonly</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\Release\</OutputPath>
        <DefineConstants>TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <ItemGroup>
        <Reference Include="PresentationCore" />
        <Reference Include="PresentationFramework" />
        <Reference Include="PresentationFramework.Aero" />
        <Reference Include="Sdl.Desktop.IntegrationApi">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.IntegrationApi.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.Desktop.IntegrationApi.Extensions">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.IntegrationApi.Extensions.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.Desktop.Platform">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.Platform.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.Desktop.Platform.Styles">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.Platform.Styles.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.FileTypeSupport.Framework.Core">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.FileTypeSupport.Framework.Core.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.FileTypeSupport.Framework.Core.Utilities">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.FileTypeSupport.Framework.Core.Utilities.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.FileTypeSupport.Framework.Implementation">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.FileTypeSupport.Framework.Implementation.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.ProjectAutomation.Core">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectAutomation.Core.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.ProjectAutomation.FileBased">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectAutomation.FileBased.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.ProjectAutomation.Settings">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectAutomation.Settings.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.TellMe.ProviderApi">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.TellMe.ProviderApi.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.TranslationStudioAutomation.IntegrationApi">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.TranslationStudioAutomation.IntegrationApi.dll</HintPath>
        </Reference>
        <Reference Include="Sdl.TranslationStudioAutomation.IntegrationApi.Extensions">
          <HintPath>$(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.TranslationStudioAutomation.IntegrationApi.Extensions.dll</HintPath>
        </Reference>
        <Reference Include="System" />
        <Reference Include="System.Core" />
        <Reference Include="System.Data" />
        <Reference Include="System.Drawing" />
        <Reference Include="System.Windows.Forms" />
        <Reference Include="System" />
        <Reference Include="System.Core" />
        <Reference Include="System.Xaml" />
        <Reference Include="System.Xml" />
        <Reference Include="WindowsBase" />
        <Reference Include="WindowsFormsIntegration" />
      </ItemGroup>
      <ItemGroup>
        <Compile Include="Commands\CommandHandler.cs" />
        <Compile Include="Constants.cs" />
        <Compile Include="Controls\SortAwareDataGrid.cs" />
        <Compile Include="DsiViewerInitializer.cs" />
        <Compile Include="Model\SdlMtCloudFilterSettings.cs" />
        <Compile Include="Model\TranslationOriginData.cs" />
        <Compile Include="PluginResources.Designer.cs">
          <AutoGen>True</AutoGen>
          <DesignTime>True</DesignTime>
          <DependentUpon>PluginResources.resx</DependentUpon>
        </Compile>
        <Compile Include="Services\SegmentVisitor.cs" />
        <Compile Include="Service\FilterApplier.cs" />
        <Compile Include="Studio\DisplayFilters\SdlMtCloudDisplayFilter.cs" />
        <Compile Include="TellMe\CommunitySupportAction.cs" />
        <Compile Include="TellMe\DsiViewerTellMeAction.cs" />
        <Compile Include="TellMe\TellMeProvider.cs" />
        <Compile Include="TellMe\HelpAction.cs" />
        <Compile Include="ViewModel\DsiViewerViewModel.cs" />
        <Compile Include="Model\ModelBase.cs" />
        <Compile Include="Properties\AssemblyInfo.cs" />
        <Compile Include="Properties\PluginProperties.cs" />
        <Compile Include="Model\DsiModel.cs" />
        <Compile Include="DsiViewerController.cs" />
        <Compile Include="View\DsiViewerView.xaml.cs">
          <DependentUpon>DsiViewerView.xaml</DependentUpon>
        </Compile>
      </ItemGroup>
      <ItemGroup>
        <Resource Include="Resources\TellMe.ico" />
        <Resource Include="Resources\Global.ico" />
        <Resource Include="Resources\Question.ico" />
        <Resource Include="Resources\ForumIcon.ico" />
        <Resource Include="Resources\error.png" />
        <Resource Include="Resources\information.png" />
        <Resource Include="Resources\warning.png" />
        <EmbeddedResource Include="Resources\ds.ico" />
        <EmbeddedResource Include="PluginResources.resx">
          <Generator>PublicResXFileCodeGenerator</Generator>
          <LastGenOutput>PluginResources.Designer.cs</LastGenOutput>
          <SubType>Designer</SubType>
        </EmbeddedResource>
        <Content Include="pluginpackage.manifest.xml" />
      </ItemGroup>
      <ItemGroup>
        <None Include="..\..\SdlCommunity.snk">
          <Link>SdlCommunity.snk</Link>
        </None>
      </ItemGroup>
      <ItemGroup>
        <Page Include="Styles\DataGridStyle.xaml">
          <Generator>MSBuild:Compile</Generator>
          <SubType>Designer</SubType>
        </Page>
        <Page Include="View\DsiViewerView.xaml">
          <SubType>Designer</SubType>
          <Generator>MSBuild:Compile</Generator>
        </Page>
      </ItemGroup>
      <ItemGroup>
        <WCFMetadata Include="Connected Services\" />
      </ItemGroup>
      <ItemGroup>
        <PackageReference Include="Sdl.Core.PluginFramework">
          <Version>2.1.0</Version>
        </PackageReference>
        <PackageReference Include="Sdl.Core.PluginFramework.Build">
          <Version>17.0.0</Version>
        </PackageReference>
      </ItemGroup>
      <ItemGroup />
      <PropertyGroup>
        <CreatePluginPackage>true</CreatePluginPackage>
      </PropertyGroup>
      <PropertyGroup>
        <SignAssembly>true</SignAssembly>
      </PropertyGroup>
      <PropertyGroup>
        <AssemblyOriginatorKeyFile>..\..\SdlCommunity.snk</AssemblyOriginatorKeyFile>
      </PropertyGroup>
      <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    </Project>

    Or, share your entire csproj file so someone can look at what you have done.  There are many references here so maybe you missed one and another set of eyes might help.

    emoji
  • I tried with other Configuration and AnyCPU using TargetFrameworkVersion v4.8 and the result is the same... I have not more ideas...Could you put me in touch with a Trados developer or similar?

    I attached the csproj file.

    PangeaMtTranslationProvider.zip

    emoji
  • Hi  !

    Try to put <PluginDeploymentPath> in its own property group. It should not be in a conditioned one.

    emoji
  • Hi  !

    I tried it before for this reason I changed in differents places.

    I will try again.

    emoji
  • It works! What does this import do? Now I'm going to try upgrade install in Trados Studio 2022 and I tell you.

    emoji
  • Files with the .targets extension, in general, define the steps in the standard build process, so I can only assume that "Sdl.Core.PluginFramework.Build.targets" is a very old version for building plugins, pertaining to Studio11.

    Since then, there have been many changes to the PluginFramework and it is not imported like that anymore, but as a nuget package, Sdl.Core.PluginFramework.Build.

    emoji