soldierq / QLicense

A Ready To Use Software Licensing Solution in C#
MIT License
181 stars 93 forks source link

Unable to compile #15

Open ajtruckle opened 2 years ago

ajtruckle commented 2 years ago

Hi

I created a PFK and CER file and copied both into the demo project.

I adjusted the password.

I also set the target framework to 4.7.2 but it will not compile:

Severity    Code    Description Project File    Line    Suppression State
Error   CS0246  The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)  DemoActivationTool  D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.cs  6   Active
Error   CS0246  The type or namespace name 'DemoLicense' could not be found (are you missing a using directive or an assembly reference?)   DemoActivationTool  D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.cs  7   Active
Error   CS0246  The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)  DemoActivationTool  D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.cs  50  Active
Error   CS0246  The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)  DemoActivationTool  D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.Designer.cs 91  Active
Error   CS0246  The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)  DemoActivationTool  D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.Designer.cs 93  Active
Error   CS0246  The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)  DemoWinFormApp  D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmActivation.Designer.cs   83  Active
Error   CS0246  The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)  DemoWinFormApp  D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmMain.cs  5   Active
Error   CS0246  The type or namespace name 'DemoLicense' could not be found (are you missing a using directive or an assembly reference?)   DemoWinFormApp  D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmMain.cs  6   Active
Error   CS0246  The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)  DemoWinFormApp  D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmMain.Designer.cs 58  Active

Yet, I can see it there.

Please.

Thanks.

ajtruckle commented 2 years ago

I restarted VS2019 and tried again in Release Build:

1>------ Rebuild All started: Project: QLicense, Configuration: Release Any CPU ------
1>  QLicense -> D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll
2>------ Rebuild All started: Project: ActivationControls4Win, Configuration: Release Any CPU ------
3>------ Rebuild All started: Project: DemoLicense, Configuration: Release Any CPU ------
4>------ Rebuild All started: Project: ActivationControls4Wpf, Configuration: Release Any CPU ------
2>  ActivationControls4Win -> D:\My Programs\2022\QLicense-master\Core\ActivationControls4Win\bin\Release\QLicense.Windows.Controls.dll
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
3>  DemoLicense -> D:\My Programs\2022\QLicense-master\Demo\DemoLicense\bin\Release\DemoLicense.dll
5>------ Rebuild All started: Project: DemoWinFormApp, Configuration: Release Any CPU ------
6>------ Rebuild All started: Project: DemoActivationTool, Configuration: Release Any CPU ------
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3275: The primary reference "D:\My Programs\2022\QLicense-master\Demo\DemoLicense\bin\Release\DemoLicense.dll" could not be resolved because it has an indirect dependency on the assembly "QLicense, Version=1.1.0.0, Culture=neutral, PublicKeyToken=262f79a9a8023ad7" which was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3275: The primary reference "QLicense.Windows.Controls" could not be resolved because it has an indirect dependency on the assembly "QLicense, Version=1.1.0.0, Culture=neutral, PublicKeyToken=262f79a9a8023ad7" which was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Demo\DemoLicense\bin\Release\DemoLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "QLicense.Windows.Controls" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmMain.cs(5,7,5,15): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
5>D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmMain.cs(6,7,6,18): error CS0246: The type or namespace name 'DemoLicense' could not be found (are you missing a using directive or an assembly reference?)
5>D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmActivation.Designer.cs(83,17,83,25): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
5>D:\My Programs\2022\QLicense-master\Demo\DemoWinFormApp\frmMain.Designer.cs(58,17,58,25): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\ActivationControls4Win\bin\Release\QLicense.Windows.Controls.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3275: The primary reference "D:\My Programs\2022\QLicense-master\Core\ActivationControls4Win\bin\Release\QLicense.Windows.Controls.dll" could not be resolved because it has an indirect dependency on the assembly "QLicense, Version=1.1.0.0, Culture=neutral, PublicKeyToken=262f79a9a8023ad7" which was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3275: The primary reference "D:\My Programs\2022\QLicense-master\Demo\DemoLicense\bin\Release\DemoLicense.dll" could not be resolved because it has an indirect dependency on the assembly "QLicense, Version=1.1.0.0, Culture=neutral, PublicKeyToken=262f79a9a8023ad7" which was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Demo\DemoLicense\bin\Release\DemoLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.cs(6,7,6,15): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
6>D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.cs(7,7,7,18): error CS0246: The type or namespace name 'DemoLicense' could not be found (are you missing a using directive or an assembly reference?)
6>D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.cs(50,68,50,76): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
6>D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.Designer.cs(91,17,91,25): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
6>D:\My Programs\2022\QLicense-master\Demo\DemoActivationTool\frmMain.Designer.cs(93,17,93,25): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
4>D:\My Programs\2022\QLicense-master\Core\ActivationControls4Wpf\LicenseActivateControl.xaml.cs(1,7,1,15): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
========== Rebuild All: 3 succeeded, 3 failed, 0 skipped ==========
ajtruckle commented 2 years ago

If I change the framework to v4:


Rebuild started...
1>------ Rebuild All started: Project: QLicense, Configuration: Release Any CPU ------
1>  QLicense -> D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll
2>------ Rebuild All started: Project: ActivationControls4Win, Configuration: Release Any CPU ------
3>------ Rebuild All started: Project: DemoLicense, Configuration: Release Any CPU ------
4>------ Rebuild All started: Project: ActivationControls4Wpf, Configuration: Release Any CPU ------
2>  ActivationControls4Win -> D:\My Programs\2022\QLicense-master\Core\ActivationControls4Win\bin\Release\QLicense.Windows.Controls.dll
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(1,7,1,15): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(7,30,7,38): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(34,25,34,38): error CS0246: The type or namespace name 'LicenseStatus' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(34,39,34,56): error CS0115: 'MyLicense.DoExtraValidation(out string)': no suitable method found to override
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(12,10,12,27): error CS0246: The type or namespace name 'ShowInLicenseInfoAttribute' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(12,10,12,27): error CS0246: The type or namespace name 'ShowInLicenseInfo' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(12,55,12,81): error CS0103: The name 'ShowInLicenseInfoAttribute' does not exist in the current context
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(18,10,18,27): error CS0246: The type or namespace name 'ShowInLicenseInfoAttribute' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(18,10,18,27): error CS0246: The type or namespace name 'ShowInLicenseInfo' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(18,55,18,81): error CS0103: The name 'ShowInLicenseInfoAttribute' does not exist in the current context
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(25,10,25,27): error CS0246: The type or namespace name 'ShowInLicenseInfoAttribute' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(25,10,25,27): error CS0246: The type or namespace name 'ShowInLicenseInfo' could not be found (are you missing a using directive or an assembly reference?)
3>D:\My Programs\2022\QLicense-master\Demo\DemoLicense\MyLicense.cs(25,55,25,81): error CS0103: The name 'ShowInLicenseInfoAttribute' does not exist in the current context
5>------ Rebuild All started: Project: DemoWinFormApp, Configuration: Release Any CPU ------
6>------ Rebuild All started: Project: DemoActivationTool, Configuration: Release Any CPU ------
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\ActivationControls4Win\bin\Release\QLicense.Windows.Controls.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3275: The primary reference "D:\My Programs\2022\QLicense-master\Core\ActivationControls4Win\bin\Release\QLicense.Windows.Controls.dll" could not be resolved because it has an indirect dependency on the assembly "QLicense, Version=1.1.0.0, Culture=neutral, PublicKeyToken=262f79a9a8023ad7" which was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "D:\My Programs\2022\QLicense-master\Core\QLicense\bin\Release\QLicense.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3275: The primary reference "QLicense.Windows.Controls" could not be resolved because it has an indirect dependency on the assembly "QLicense, Version=1.1.0.0, Culture=neutral, PublicKeyToken=262f79a9a8023ad7" which was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3274: The primary reference "QLicense.Windows.Controls" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
6>CSC : error CS0006: Metadata file 'D:\My Programs\2022\QLicense-master\Demo\DemoLicense\bin\Release\DemoLicense.dll' could not be found
5>CSC : error CS0006: Metadata file 'D:\My Programs\2022\QLicense-master\Demo\DemoLicense\bin\Release\DemoLicense.dll' could not be found
4>D:\My Programs\2022\QLicense-master\Core\ActivationControls4Wpf\LicenseActivateControl.xaml.cs(1,7,1,15): error CS0246: The type or namespace name 'QLicense' could not be found (are you missing a using directive or an assembly reference?)
========== Rebuild All: 2 succeeded, 4 failed, 0 skipped ==========
ajtruckle commented 2 years ago

I reviewed the source files again and their is a mixture of 4.0 and 4.7.2 references. When I made them all 4.7.2 and re-compiled I had no errors. Now I need to test the system.

ajtruckle commented 2 years ago

Great! it is working. It may be worth tweaking the source files to be consistent for 4.7.2.