VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

LicenseException: Not correct assembly name.



LicenseException: Not correct assembly name.

Post by siradude »

Hi,
I have a WPF desktop app using .net 8, x64 (also tried x86)
All works well, but when published into a single file I get the following error when trying to start the VintaSOft DeviceManager:

System.ComponentModel.LicenseException: Not correct assembly name at Vintasoft.WpfTwain.DeviceManager.ctor(window parentWindow, CountryCode country, LanguageType language)

Sorry had to type in the error code by hand (in case i mispelled something)
As stated if I dont publish a single file, all works well

BTW: using VinstaSoft SDK .NET v 12.x

Any help would be welcomed.


Re: LicenseException: Not correct assembly name.

Post by Alex »

Hello,

You have error because you are trying to embed Vintasoft.WpfTwain.dll into other DLL. This is not possible and prohibited by the license agreement: https://www.vintasoft.com/vstwain-dotnet-license.html

Please read how to exclude files from being embedded in section "Exclude files from being embedded" in article "Single-file deployment" on Microsoft's web site: https://learn.microsoft.com/en-us/dotne ... g-embedded

Best regards, Alexander


Re: LicenseException: Not correct assembly name.

Post by siradude »

Thanks for the info.

I will see if I can exclude that .dll from the bundled .exe and give that a try,

Update:

I found the existing section in the project file that referenced the .dll and added the Exclude
<ItemGroup>
  <Reference Include="Vintasoft.WpfTwain">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
    <HintPath>..\VintaSoft\Vintasoft.WpfTwain.dll</HintPath>
    <Private>True</Private>
  </Reference>
</ItemGroup>
After this, all is working again.

Thanks for you prompt response.


Page 1 from 1: 1