Visual Studio Version:
Summary:
The Visual Studio support for Windows Forms licensing was implemented in https://github.com/dotnet/project-system/pull/5468, and works well if you opt out of the globs. VS will automatically add it to EmbeddedResource:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
</PropertyGroup>
<ItemGroup>
<Reference Include="C:\Program Files (x86)\DevExpress 19.1\Components\Bin\Framework\*.dll" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="licenses.licx" />
</ItemGroup>
</Project>
However with globs turned on, we don't add a specific item if a glob covers it. Based on that, the SDK needs to cover licenses.licx in EmbeddedResource item.
Steps to Reproduce:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="C:\Program Files (x86)\DevExpress 19.1\Components\Bin\Framework\*.dll" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</Project>
Expected Behavior:
Properties\licenses.licx gets created and ends up in EmbeddedResource item
Actual Behavior:
Properties\licenses.licx gets created but ends up in None item type
User Impact:
Licensed controls don't work at runtime.
License.licx can live in both the AppDesigner folder (which can be renamed to something custom) and in the root of the project.
tag @nguerrera
@livarcocc Can you put this in the milestone that corresponds with 16.4 as per offline agreement?
@vatsan-madhavan @dsplaisted should this globbing go in WindowsDesktop sdk?
@davkean I鈥檝e put it in 3.1.1xx milestone, which matches 16.4. Thank you for the detailed issue.
Sure, that鈥檚 ok by me. What鈥檚 the plan for LC.exe? Wouldn鈥檛 we want a netcoreapp version of it as well?
@vatsan-madhavan LC.exe executes code so controls can generate the license data you are embedding (you are not embedding the literal licx file, its just instructions for LC.exe which controls need a license).
Desktop version of LC.exe won't be able to execute .NET Core code, so yes, LC.exe needs to be ported if you don't want to replace the whole licensing mechanism with something different.
Once its clear who will own LC.exe I have some follow-up issues to create for future improvements, historically LC.exe is very fragile and errors are hard to diagnose, but lets first get things actually working. Since WebForms are gone WinForms is probably the only one still using this kind of licensing, but I'm not entirely sure of that.
Any news for who is going to be responsible for porting LC.exe? There's dotnet/winforms#1462 but it has seen no action since this issue was created. If you want to get this into 3.1 this probably needs to be picked up soonish.
The issue in winforms is the right one to track that.
My understanding is that we are not bringing LC.ee to .NET Core and instead @terrajobst will work on a newer way of licensing .NET Core apps.
@terrajobst @OliaG where can curious people follow this progress?
Most helpful comment
@vatsan-madhavan LC.exe executes code so controls can generate the license data you are embedding (you are not embedding the literal licx file, its just instructions for LC.exe which controls need a license).
Desktop version of LC.exe won't be able to execute .NET Core code, so yes, LC.exe needs to be ported if you don't want to replace the whole licensing mechanism with something different.
Once its clear who will own LC.exe I have some follow-up issues to create for future improvements, historically LC.exe is very fragile and errors are hard to diagnose, but lets first get things actually working. Since WebForms are gone WinForms is probably the only one still using this kind of licensing, but I'm not entirely sure of that.