How to know what version of VisualStudio is integrated with vcpkg - point-cloud-library

I need to use PCL(Point Cloud Library) with PCAP.
I heard that I can use PCL without any modification of configuration after installation of PCL using vcpkg.
But, In the new project in VS2017 and VS2019, IDE cannot find source.
My environment and installation steps are blow.
Windows10
VS2017 and VS2019 are installed
I added below code in triplets file "x64-windows.cmake"
set(VCPKG_PLATFORM_TOOLSET v141)
I installed packages following below steps, in PowerShell.
.\vcpkg install pcl[pcap]:x64-windows --featurepackages
.\vcpkg integrate install
VS2017 cannot found PCL source, So I Checked project properties.
There are not any directory values about pcl.
And, I entered values.
"%VCPKG_ROOT%\installed\x64-windows\lib" and files(*.lib)
"%VCPKG_ROOT%\installed\x64-windows\include"
"%VCPKG_ROOT%\installed\x64-windows\bin"
But, PCL is still not working
I also checked "%VCPKG_ROOT%\installed\x64-windows\lib".
"boost_atomic-vc140-mt.lib" is in this folder.
vc140 is for VS2015. Isn`t it?
How to install PCL for VS2017, and integrate with VS2017?

BlueGo has support for PCL (right now only Visual Studio 2015 is supported), but it should be not that hard to modify it to support VS 2017.

Related

Installing a compiler for Qt4.8.7 on Windows10

I am trying to install Qt4.8.7 for Windows 10 and I am having some issues with installing the corresponding compiler.
I got the Qt4.8.7 installer from this link: https://download.qt.io/archive/qt/4.8/4.8.7/ and I have tried working with the MSVC2010 and the mingw versions. For the MSVC2010 version, I followed this guide https://wiki.qt.io/How_to_setup_MSVC2010 (with a lot of dead links) and installed the compiler alongside the MSVC service pack 1 and Windows SDK 7.1. I have not been able to find an installer for Visual Studio 2010 or the VS service pack 1. Qt studio recognises the version of qt I have installed alongside the corresponding MSVC2010 x86 compiler but when I compile I get this error for a missing header: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h:26: error: C1083: Cannot open include file: 'ammintrin.h': No such file or directory".
For the mingw version, I have not been able to find the correct version "mingw482" and other versions I have tried do not seem to be compatible. I have tried mingw installer programs as well as using the QT online installer to try and find the correct version but I haven't had much luck when compiling.
Has anyone got qt4.8.7 running on windows recently? If so, could you please point me in the right direction for installing the correct compiler?
Many thanks.
Here a short description for getting it to work with Visual Studio 2008 and the newest Qt Creator 4.13.
You will need:
Visual Studio 2008 Express for the build tools, there are no standalone build tools as far as I'm aware
Qt 4.8.7 precompiled for VS2008 from this link to Qt archives at the time of writing this the version you need is called "qt-opensource-windows-x86-vs2008-4.8.7.exe"
Any Windows debugger cdb.exe
Steps (all absolute paths are standard installation paths):
Install VS2008
Install Qt 4.8.7
Open your Qt Creator go to Tools->Options...->Kits->Tab Compilers and search for "Microsoft Visual C++ Compiler 9.0", it probably won't be there so you will need to add it by hand by looking for the vcvarsall.bat of this compiler. You will find it in C:/Program Files(x86)/Microsoft Visual Studio 9.0/VC/vcvarsall.bat. Repeat for C, C++, x86 and x64. Press save
Open the Qt-Versions tab and look for Qt 4.8.7 Version. It will probably not be there again so add it by hand by selecting the qmake.exe from C:/Qt/4.8.7/bin/qmake.exe. Press save
Open the Kits tab and add a new kit. Select your Qt 4.8.7 version and the MS compilers for C and C++, your favorite debugger and input the Qt-makespec win32-msvc2008. Press save again
Now you should be able to compile your project from Qt Creator and Qt-colored-commandline. For integration of MSVC 9.0 into Visual Studio 2015 and newer you will also need to install Visual Studio 2012 Express. In that order:
VS2008
VS2012 (Here MS programmed in some magic so newer VS can see older build tools)
VS201x
It could work in any other order but don't rely on it. Also it could just flat out not work and you will waste a week of your life to fix it; but then it will work.
Haven't tested it but I could imagine the same workflow will work for VS2010.

Visual Studio: attribute 'nodiscard' requires compiler flag '/std:c++17'

Im following this guide: https://www.azerothcore.org/wiki/Installation
I am trying to compile build 6a95e61 with no additional modules under win64 and get 439 identical errors. They point to different files after like half a minute when selecting build/build solution in Visual Studio:
C2429 attribute 'nodiscard' requires compiler flag '/std:c++17' (compiling source file C:\Azerothcore\azerothcore\src\server\shared\DataStores\DBCDatabaseLoader.cpp) shared c:\azerothcore\azerothcore\src\common\datastores\dbcfileloader.h 38
A full wipe and starting over from git-bash yields the same results, so i guess im making mistakes in the process, any suggestion is appreciated.
Big thanks to the guys on azerothcore discord!
Steps which solved it for me:
Uninstalling Visual Studio 2017 and cMake 3.8.2
Installing Visual Studio 2019 with all dependancies in "Desktop Development with C++" and
Installing cMake 3.19.2
re-Built with cMake (as in the official guide)
Build/Build Solution in Visual Studio (as in the official guide)

Visual studio 2017 Update 3 - The SDK 'Microsoft.NET.Sdk.Web' specified could not be found

Error:
C:\WebApp\WebApp.csproj : error : The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. C:\WebApp\WebApp.csproj
I am trying to open Dotnet core project and I am getting the above error.
I have installed the latest SDK from https://www.microsoft.com/net/core#windowscmd
I have checked the path for dotnet cmd and it works fine.
Am I missing something? Let me know if you need more information.
The target framework is set to .NET 4.5.2
I stumbled upon this issue a number of times recently. Here's a brief list of the workaround I found (one of them always worked until now):
Install the right .NET Core SDK: Either the latest version or the version required by your project.
Clean-up obsolete .NET Core versions: Go to Control Panel and uninstall previous .NET Core SDK/Runtime versions (as long as you don't use them anymore).
Create a Global.json file: Add a new global.json file to your project's root with the following content (replace the .NET Core version build with the one you want to run the project with):
{
"sdk": {
"version": "2.0.5"
}
}
Rename the SDK reference: Open your .proj file and replace <project sdk="Microsoft.NET.Sdk.web"> with <project sdk="Microsoft.NET.Sdk"> .
Add the MSBuildSDKsPath Environment Variable: The dotnet CLI sets the MSBuildSDKsPath environment variable when invoking MSBuild: however, a December 2016 patch changed the CLI behaviour so that it will respect an existing environment variable, if it has already been set: this will allow the developer to “force” the CLI to use a specific SDK.
Check your PATH: Verify that both C:\Program Files\dotnet and C:\Program Files (x86)\dotnet are in the PATH environment variable.
For additional info regarding the issue and other viable fixes check out this blog post that I wrote on this topic.
I agree with the comment on Sundeep's answer, you shouldn't have a global.json file in your project anymore.
It seems as though installing the .NET Core 2.0 SDK is causing issues with the PATH. Verify that C:\Program Files\dotnet and C:\Program Files (x86)\dotnet are in the PATH environment variable. In my case, these values were already present under System Variables so I added them to User Variables and rebooted my machine. This resolved my issue.
As suggested in the comment, I updated global.json file as shown below
{
"sdk": {
"version": "1.0.0"
}
}
Also, I had to remove the <ItemGroup> which contains wwwroot files path in .csproj file.
Reload the project and it works like a charm!
I've encountered the same problem, I just rename <project sdk="Microsoft.NET.Sdk.web"> to <project sdk="Microsoft.NET.Sdk"> on csproj
another situation:
https://stackoverflow.com/a/55529011/2971851
issue details: 2.1.6xx & 2.2.2xx version of the SDKs are only supported
on Visual Studio 2019. VS 2017 needs 2.1.5xx & 2.2.1xx versions of the
SDK.
How to fix the issue? Install 2.1.5xx version of the SDK if you are
targetting a 2.1 app Install 2.2.1xx version of the SDK if you are
targetting a 2.2 app.
and according to the official document:
Note: If you are a Visual Studio user, there are MSBuild version
requirements so use only the .NET Core SDK supported for each Visual
Studio version. If you use other development environments, we
recommend using the latest SDK release.
Do not uninstall previous SDK versions!
When I followed the 2nd step suggested in Darkseal's answer, uninstalling the previous SDK versions, it caused an "expected imports are missing" fatal error every time I opened up my project, so I needed to repair my Visual Studio, since installing the old SDK versions again kept popping up this error...
Also the other steps mentioned in that answer did not make any difference (both dotnet references were present in the environment variables and MSBuildSDKsPath was not needed for me).
Install the proper SDK version and select it in the Solution's Properties
As Jyoten mentioned I was using VS2017 x86 version and my SDKs were x64.
However, this was not the only issue, it seems there's some incompatibility with some SDK versions and VS2017. Having installed SDK v2.2.203 and v2.2.202, they would never showed up in the Target framework dropdown when I double-clicked the Properties on my project's solution (in the Solution Explorer (Ctrl+Alt+L)).
So I needed to install v2.2.105 x86 as mentioned in this answer, for it to show up in that dropdown.
Once it did, the solution that was requiring .NET Core v2.2 worked properly (did the Build normally).
I had this issue when I had to open a .Net Core 1.0.4 project in VS2017.
When I installed 1.0.4 SDK, i chose the x64 version which placed the sdk files in 'c:\Program Files\dotnet' ...
but my VS2017 was 32bit and was therefore looking for the sdk in 'c:\Program Files (x86)\dotnet'.
Once I installed the 32 bit version of the SDK it worked fine.
I was running into an issue where creating a new ASP.NET Core 2.0 project was giving me an error The SDK 'Microsoft.Net.Sdk.Web' specified could not be found, and leaving me unable to open the project in Visual Studio. The problem was the project was created in a folder that contained a global.json file, tying the SDK version to 1.0.0.
Deleting the global.json, or updating it to 2.0.0, fixed the issue. Be sure to check parent folders too - if any parent folder contains a global.json, the SDK version specified in the "closest" folder will be used.
I was getting this error in Visual Studio Code.
I was able to find the issue by setting the OmniSharp log settings in VS Code to debug. Once I did that I could see that it wasn't finding Microsoft.Build.Resources.dll.
I installed MS Build by repairing my VS 2017 Community installation. That fixed it.
uninstall and reinstall microsoft .NET core SDK.
then restart visual studio.
this works for me.
Choose the proper SDK according to your Visual Studio and Operating System. I downloaded the correct version from here https://dotnet.microsoft.com/download/visual-studio-sdks and after that .Net Core appeared in target frameworks list (there is a strict dependence between sdk version and VS version, so be careful).
I have solved this issue by,
go to this site, https://dotnet.microsoft.com/download
In that, install both .NET Core Runtime and .NET Core SDK.
After you install that, Open the Visual Studio 2017 with an administrator, Now The problem has been gone😊
I edited the .csproj file and changed netcoreapp2.2 to netcoreapp2.1 in this stanza & then I was able to get it working.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
Install the proper SDK version and go to below links
https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.403-windows-x64-installer
https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-desktop-3.1.9-windows-x64-installer
This worked for me:
Make sure that the .NET folder where SDKs are and Visual Studio are
in the same program files (x86) or program files.
Provide the path to the SDK in the environment variable.
If anyone else stumbles upon this issue (including future me), I had the same problem and tried literary every solution proposed here and nothing worked. Finally what fixed the issue for me was deleting NuGetFallbackFolder in C:\Program Files\dotnet\sdk.
After deleting that folder, everything just started to work magically.
I had this error when from old project (in .NET 4.7.2) I was trying to do:
var project = new Microsoft.Build.Evaluation.Project(someDotNet6ProjectPath);
The solution was to upgrade Microsoft.Build packages.

How to restore an ASP.NET Core project with Ubuntu

Recently, I created an asp.net core project using Visual Studio Code on Windows and pushed it to GitHub. When I cloned the repo from GitHub and attempted to do a dotnet restore on the project on Ubuntu, an error message stating there was no project.json file was returned. Can anyone point me to a resource that will show me how to properly restore a .net core project from a Linux machine? Thanks!
So it seems like on each of your machines you are running different versions of the .net core SDK.
A big caveat with what you are trying to do. Are you trying to use Project Rider from Jetbrains on Linux? This only works with project.json (As of the time of this post) so be wary of that.
Now there are two ways to do this. If you are wanting the very latest on Linux and don't care about using Rider, then you can go here : https://github.com/dotnet/core/blob/master/release-notes/download-archive.md and download the latest release for both Linux and Windows, install on both and you should be good to go.
If you do care about using Rider or you aren't ready to be strapped in for the wild ride of the latest release. Then you can do the following.
Find what version of the SDK you have on linux by typing into a terminal the following :
dotnet --version
This will spit out what version you have on linux. Go here and download the same version for windows and install it on your windows machine (https://github.com/dotnet/core/blob/master/release-notes/download-archive.md).
Now BEFORE you create a project, create a solution folder and create a file in it called global.json. Inside that put the following :
"sdk": {
"version": "1.0.0-preview2-003131"
}
Where the SDK version matches what you got from your linux terminal. Now create a folder for your project inside the solution folder. Run "dotnet new -t web" or a similar command to create your project. It will inspect the SDK version of the global.json and create a project with the tooling that matches. You should then be able to shift this project around any machine that has the same SDK installed, even if it also has the latest SDK's also.
If you do not create the global.json, it defaults to the latest version (Atleast on Windows).
Read a bit more about it here : http://dotnetcoretutorials.com/2017/02/17/developing-two-versions-net-core-sdk-side-side/

Error when installing Visual Studio Tools for Apache Cordova CTP3.0 in Visual Studio 2013

I installed Multi-Device Hybrid Apps for Visual Studio 2013 CTP 2.0. I then updated VS2013 to update 4. Now I can't upgrade MDHA to 3.0 because it tells me to uninstall 2.0 first, however the uninstaller doesn't work. When trying to uninstall 2.0 from Programs and Features, it just goes through the setup and then doesn't remove the software from the Add/Remove list.
I tried following this however it doesn't work:
http://support.microsoft.com/kb/3014133
I ended up discovering that the package GUID in the the KB article is wrong. I used this to uninstall the 2.0, then I could install 3.0. The package ID may vary so you may need to search the directory for vs2013mda_0.1.exe and replace the command with your package location.
"%ProgramData%\Package Cache\{38f367f1-1468-4f16-a4c4-29747084003b}\vs2013mda_0.1.exe" /uninstall /passive /force /burn.ignoredependencies={53d408db-eb91-43fb-9d8f-167681c19763};vsupdate_KB2829760
Also,be prepared to wait. This takes a long time.
Thank you TechnoTim, the problem is that, every people has its own package GUID.
To solve the problem, you must lunch the command from the root directory, c:\, changing the package GUID with your package GUID.
In my system:
C:\>"%ProgramData%\Package Cache\{dea88246-f74a-4171-ad6c-d9c978bf2973}\vs2013md
a_0.1.exe" /uninstall /passive /force /burn.ignoredependencies={53d408db-eb91-43
fb-9d8f-167681c19763};vsupdate_KB2829760
To find the right package GUID I go to C:\ProgramData\Package Cache\ and search for
vs2013mda_0.1.exe and save the path in the block note, then change in path in the orignal command and lunch it from the root directory c:\, and its work.
Sorry fom my english.
Goodbye!
"You cannot install Visual Studio Tools for Apache Cordova CTP3.0 in Visual Studio 2013"
To resolve this issue, follow these steps to uninstall Multi-Device Hybrid Apps for Visual Studio CTP 2.0
Open a command prompt as an administrator.
Run the following command: "%ProgramData%\Package Cache{dea88246-f74a-4171-ad6c-d9c978bf2973}\vs2013mda_0.1.exe" /uninstall /passive /force /burn.ignoredependencies={53d408db-eb91-43fb-9d8f-167681c19763};vsupdate_KB2829760
Run vs2013mda_0.3.exe again for Visual Studio Tools for Apache Cordova CTP 3.0.
The above worked when installing update 4, please see: http://support.microsoft.com/kb/3014133
I solved this problem by another way.
I have tried to uninstall from command line, but no one of paths don't exists on my computer.
And I simply created another user with administrator permissions and installed new apache cordova tools from that user.
In my situation it correctly works running by new created user and old user.
Sorry for my horrible English.

Resources