T O P I C R E V I E W |
aignatenko |
Posted - Dec 19 2013 : 04:07:17 AM We are using NuGet with native C++ packages (http://docs.nuget.org/docs/reference/support-for-native-projects). This is quite handy and works relatively stable.
However, VA doesn't look into the headers inside installed packages, while Intellisense does (VS 2012). I guess this is so because include paths for nuget packages are injected into .vcxproj as "import" directives.
Are there any workaround to make VA work with C++ NuGet packages? |
11 L A T E S T R E P L I E S (Newest First) |
sean |
Posted - Apr 10 2015 : 11:31:02 PM case=87289 is fixed in build 2062. |
accord |
Posted - Jan 11 2015 : 4:58:49 PM I was able to reproduce the problem using boost so I have put in a bug report for this:
case=87289
Thank you for the clean steps. |
mikhail.matrosov |
Posted - Jan 02 2015 : 03:16:07 AM The issue is still actual. I'm using boost NuGet package (http://www.nuget.org/packages/boost/) in my solution and VAX does not parse it automatically. If I open a boost header manually, VAX sees and remembers all the definitions. But after I restart IDE, they are gone.
VAX settings: https://www.dropbox.com/s/fdbyxy1gjp62m91/20150102115747.reg?dl=0 Visual Studio settings: https://www.dropbox.com/s/23zuk0eoj0kp0yl/Exported-2015-01-02.vssettings?dl=0
VAX info: VA_X.dll file version 10.9.2052.0 built 2014.11.05 DevEnv.exe version 12.0.31101.0 Ultimate msenv.dll version 12.0.31101.0 Comctl32.dll version 6.10.7601.17514 Windows 7 6.1 Build 7601 Service Pack 1 8 processors (x86-64, WOW64) Language info: 1251, 0x419 |
feline |
Posted - Jul 14 2014 : 5:18:12 PM If you close and reload the solution, or the entire IDE, is VA then picking up the correct directories? I am assuming you are switching git branches while the solution is open. |
mikhail.matrosov |
Posted - Jul 11 2014 : 04:16:29 AM The issue is still actual when packages.config is modified not by Visual Studio NuGet Package Manager, but externally, e.g. after switching git branches. Is there any workaround? |
sean |
Posted - Jun 26 2014 : 01:49:09 AM case=79296 is fixed in build 2042. |
feline |
Posted - Dec 30 2013 : 11:32:44 PM Thank you for your patience and clear instructions. I found the problem with the #include <zlib.h> line being underlined, I needed to restart the IDE / reload the solution after getting NuGet to generate the packages, before the directory and file were known to the IDE.
I understand now why adding directories for these packages is not going to scale well, the packages are in solution specific directories. I have put in a bug report for this:
case=79296
Hopefully it won't be to difficult to work out the extra directories to check. |
aignatenko |
Posted - Dec 24 2013 : 09:13:59 AM It works differently at my side.
#include <zlib.h> is not underlined and I can go to definition (F12) of, e.g. deflateInit which is defined in zlib.h. "Go to file" is working, giving the file from $(SOLUTION_DIR)\\packages\\zlib.1.2.8.6\\build\\native\\include\\zlib.h
VA is disabled for tests.
VS information:
Microsoft Visual Studio Ultimate 2012 Version 11.0.61030.00 Update 4 Microsoft .NET Framework Version 4.5.50938

|
feline |
Posted - Dec 23 2013 : 8:19:10 PM I have the test project, thank you for this. The solution builds, but I am not sure this is working the same way your situation is working.
At the top of the file "ConsoleApplication1.cpp" I have:
#include <zlib.h>
the #include is underlined with a red line, which is coming from VS2012. Right clicking on "zlib.h" and selecting "Open Document <zlib.h>" (the IDE command) I get an error message from the IDE, telling me that the IDE cannot find "zlib.h" in any of the include directories. Are you seeing the same behaviour, or is this working differently for you?
At least here, what ever method the build process is using to identify the directories is not known to the IDE, so I should not be getting any intellisense here either. |
aignatenko |
Posted - Dec 23 2013 : 06:43:49 AM I've made a very simple project to demostrate the problem: You can download it here: https://www.dropbox.com/s/wimxtqbhadxutw0/VA_nuget_test.zip
Before using, you need to install NuGet from the VS extension manager. This project reference zlib library from nuget.org server. It should be downloaded automatically when you try to compile the project. You'll find unpacked zlib in $(SOLUTION_DIR)\\packages.
The project is using v100 runtime, because zlib packages doesn't have prebuild binaries for v110.
Anyway, note that references to zlib.h are not parsed by VA.
quote: Do you know the directories you want VA to parse? If you are only working on a few solutions then adding these directories to the project include directories.
Yes, I tried this and it seems to work. However, I can't recommend this approach to my team. Maybe as a workaround only.
|
feline |
Posted - Dec 19 2013 : 9:52:14 PM Do you have a sample project I can use to study this problem? I have tried following the steps given on this page:
http://coapp.org/tutorials/installation.html
but something is going wrong, and when I get to the line where you type:
Update-CoAppTools -KillPowershells
into a Powershell window I just get an error about the module could not be loaded. So there is obviously something I am missing.
Do you know the directories you want VA to parse? If you are only working on a few solutions then adding these directories to the project include directories.
Go into the project properties for your solution, and add the required directories to:
Configuration Properties -> VC++ Directories -> Include Directories
I would recommend pressing the button:
VA Options -> Performance -> Rebuild symbol databases
and restarting VS2012 after making this change, and hopefully it will have the desired effect. |