cyotek / Cyotek.Windows.Forms.ColorPicker

Color picker control suite for Windows Forms applications.
http://cyotek.com/blog/tag/colorpicker
MIT License
149 stars 41 forks source link

Can't open demo solution in visual studio 2015 #37

Open jordircardona opened 2 years ago

jordircardona commented 2 years ago

Hi. Is the file for 2017 or 2019 ? I can't open it in 2015. Please tell.

cyotek commented 2 years ago

Hello,

The recent conversion to the SDK style project files means you will need either Visual Studio 2017 or 2019.

As I much prefer SDK projects (csproj files don't constantly change, makes multi-targeting a breeze, etc) I will be using this format going forward so the solutions won't be directly openable in older versions of Visual Studio.

Regards; Richard Moss

jordircardona commented 2 years ago

Thank you so much! I have 2019 also installed so I tried. I get this error when loading the project:

"Error MSB3644 The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks Cyotek.Windows.Forms.ColorPicker.Demo A:\Visual Studio 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1216 "

Does this mean I have to install something to run the Demo project? Developer Pack (SDK/Targeting Pack) Where can I download that?

Thanks so much for this great library of controls!

cyotek commented 2 years ago

Hello,

Interesting, I would have assumed .NET 4.8 targeting packs were installed by default.

You could download the developer packs manually from https://dotnet.microsoft.com/download/dotnet-framework/net48. Alternatively, if you run the Visual Studio Installer, opt to modify your existing installation and then select Individual Components you can select the packs to include from here (using the search box is helpful for quickly listing only the packs). This is likely much easier than downloading them individually if you need more than one.

However, if you're trying to build the whole thing from scratch you might run into issues if you don't have all packs installed - it might be easier to edit all the csproj files to remove the TargetFrameworks element (which includes everything from 3.5 up to 5) and replace it with a single TargetFramework.

E.g, replace

<TargetFrameworks>net48;net35;net40;net452;net462;net472;net5.0-windows;netcoreapp3.1</TargetFrameworks>

with

<TargetFramework>net48</TargetFramework>

Unfortunately I don't have release binaries available from GitHub yet as I was waiting until I had a stable build after all the recent changes I'm working on.

jordircardona commented 2 years ago

Thank you so much, I will try that :)

jordircardona commented 2 years ago

Hi. What I did is installing 4.8, but still VS 2019 complained that it needed 4.6.2 sdk, so I installed it too, and now the demos work right. Hope this helps other people. Thank you!

cyotek commented 2 years ago

Thanks for the follow up, glad you got it working. I'll take a look at the demo and see if I can find out why it wanted 4.6.2 as well once I've finished fixing issues in the ColorGrid.