I cannot seem to locate the .pdb files after I have created the OpenCV binaries; using Cmake and then building the OpenCV solution using VS2013. Any help?
As Martin Suggests in the comments above, see
Visual Studio 2010 not generating .pdb files
Plus different versions of OpenCV generate the files slightly differently. Search for .pdb files where you had compiled your OpenCV solution.
This is not the answer for this specific question, but since I did not find the solution and question took about it, I write it to this thread. I hope it may be useful for other fellow sufferer.
My problem was that I could not reach a subset of code in Debugging. During the Debug mode it told, that "The breakpoint will not currently be hit. No symbols have been loaded for this document", which is a well discussed problem. But the base problem was, that I could not even find a .pdb file, which should have been loaded, to reach that code. The problem was, that the Build properties of the project has not been set correctly.
To ensure, that you project generates the .pdb file, check the Build settings of the project:
Right click on project -> Select "Build" tab -> In the "Output" section click "Advanced..." button -> At "Debug Info:" dropdownlist select "full" option.
Related
I followed the steps to integrate Dotfuscator into my Xamarin.Android project as described here, but when it's time to build the project, I'm getting the following error:
The "_DotfuscatorXamarin_DetermineDefaultInputsTask" task failed unexpectedly.
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: at InlineCode._DotfuscatorXamarin_DetermineDefaultInputsTask.Execute() in \path\to\AppData\Local\Temp\eruovv3u.0.cs:line 106
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>\path\to\PreEmptive.Dotfuscator.Xamarin.targets(570,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
I have looked and looked online, but no one seems to be having this issue. I think the problem has something to do with generating the default configuration file on the first build. Any ideas?
UPDATE: This issue has been fixed in newer versions of Dotfuscator. See the detailed instructions for the free Dotfuscator Community and for the commercially-licensed Dotfuscator Professional. The original answer follows below.
Full Disclosure: I am a developer of Dotfuscator at PreEmptive Solutions, and am answering this question in that role.
You're right, the problem is the default config file generation in the targets file (PreEmptive.Dotfuscator.Xamarin.targets) - sorry about that. Specifically, the build integration is attempting to discover project references, but expects the classic MSBuild project format, not the new minimal one used by .NET Standard.
You can work around this issue as follows:
In the targets file, locate the _DotfuscatorXamarinConfigTemplateLines property and copy its value (within the CDATA section) to a new file named DotfuscatorConfig.xml (or whatever value you supplied for the DotfuscatorXamarinConfigFileName property in your project file) in the same directory as your project file.
In Visual Studio, build your project once in a configuration you want to protect (e.g., AnyCPU|Release). It will error, because the new config file doesn't have any input assemblies yet, but by building now we get those assemblies in the right location for configuring Dotfuscator.
Open Dotfuscator's user interface.
For Community Edition, from Visual Studio, open the Tools menu and select PreEmptive Protection - Dotfuscator.
For Professional Edition, run Dotfuscator Professional Edition from the Start Menu.
In the user interface, File | Open the file created in step 1.
On the Inputs screen, click the "Add Input" button (a green plus-sign in Community Edition, a folder-opening icon in Professional Edition).
Browse to your project directory, then obj\Release\DotfuscatorXamarin\dfin, and then select the assemblies you want to protect.
Substitute Release with the appropriate directory for the configuration you built in step 2.
You should select assemblies that correspond to projects in your solution, and not select third-party and assemblies that are part of the framework.
Save the config file.
Navigate to the Project Properties editor.
In Community Edition, go to the Build Settings screen and select the Project Properties tab.
In Professional Edition, go to the Settings tab and select the Settings > Project Properties screen.
Add the following project properties (instructions for Community Edition, and for Professional Edition):
Property name InDir, value obj\Release\DotfuscatorXamarin\dfin
Property name OutDir, value obj\Release\DotfuscatorXamarin\dfout
Property name ReportDir, value DotfuscatorReports\Release
Substitute Release with the appropriate directory for the configuration you built in step 2. Note that the directories pointed to by OutDir and ReportDir won't exist on-disk yet.
Save the config file.
Return to the Inputs screen and select an input and click the pencil icon. Edit the path to the assembly from an absolute path to ${configdir}\${InDir}\AssemblyName.dll, substituting AssemblyName.dll for the actual name and extension of the assembly. Repeat for each input assembly.
Save the config file (and commit it to source control).
Rebuild the project in Visual Studio. The build integration will use your config file instead of trying to generate a new one.
on top of the Joe's marvelous solution I ended up changing one value from true to false with regards to the instructions on https://www.preemptive.com/dotfuscator/pro/userguide/en/getting_started_xamarin.html#pctoc-setup
to get my android solution to build/run.
<DotfuscatorXamarinGenerateNewConfigFile>false</DotfuscatorXamarinGenerateNewConfigFile>
I've been configuring the Dotfuscator Community Edition at Xamarin.Android project according to this user guide. And I also had the following build error (pretty the same as #AxiomaticNexus):
Error The "_DotfuscatorXamarin_DetermineDefaultInputsTask" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at InlineCode._DotfuscatorXamarin_DetermineDefaultInputsTask.Execute() in c:\Users\user\AppData\Local\Temp\wqhfhbsk.0.cs:line 106
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() eKey.Droid C:\VSProjects\dotFuscatorTest\PreEmptive.Dotfuscator.Xamarin.targets 570
I've fixed this issue using #Joe Sewell's Full Disclosure.
I hope PreEmptive Solutions will realese the fixed version asap!!!
At some point I was missing the file PreEmptive.Dotfuscator.Xamarin.targets in the root of project. I already executed the instructions above described by Joe Sewell, but later noticed the missing file.
Error were like this:
Error The "_DotfuscatorXamarin_DetermineDefaultInputsTask" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at InlineCode._DotfuscatorXamarin_DetermineD efaultInputsTask.Execute() in c:\Users\hieta\AppData\Local\Temp\k3a5f2bj.0.cs:line 106
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() WorkSafe.Droid
Just FYI if anyone else could avoid waste of time.
I have installed Visual Studio 2013 with Update 2 and installed Web Essentials.
I had thought this was going to make adding LESS to my views a piece of cake, but am missing something.
The editor is great, and I imagine that it is compiling to css on save...
But I don't know where the generated css is, and I don't have any clue as to how to get it reference in my view.
I've tried a lot of searching, but can't get through the web of links about installing this and the features of that.
Any help at all will be greatly appreciated.
Thanks!
When you add a .less file and save, the Web Essentials will compile and generate the .css and .min.css files. You will see an arrow in your solution explorer, or you can also confirm in your file system that the files are in the same folder.
Haven't used less with vs2013 but I have used sass and my guess would be the same. By default the generated css gets generated in the same directory as the source (as it seemed to me) but you can check via tools>options>web essentials and there should be a set of options for less compile on save, build and directory to name but a few.
If you right click on the solution there should be an option to create a web essentials settings file for the solution - these create and adds a json file of web essentials settings to the solution which means your settings are local to the solution which could be important if you are changing the output directory.
I am trying to install opencv in windows. The manual (secn 1.4) says "choose a build [e.g. vs2010, win32] and download", but there is only the full executable file available (for 2.4.2). So I downloaded that file, which then expanded into several directories. However, this directory list does not match what is shown under item 7 of the section - mainly the "bin" directory is missing. So I guess something more has to be done besides just clicking on the executable.
Under "build" dir, I see x86/vc10/bin (I am guessing that vc10 stands for visual c++ 2010). But how do I install these and link visual studio 2010 with it? The manual only says to setup "OPENCV_DIR" variable which should have "bin" under it, but I dont have that.
This seems like a real problem any new user would face with opencv installation. Any correct instructions and link available on how to install for windows+visual studio 2010?
Updates: Full solution posted below.
After much experimentation, I have got opencv-2.4.2(win-exe) + vstudio2010-express working together. Thanks to Abid, for providing a helpful link, an additional helpful link is http://blog.hcilab.org/bastian/2012/06/installing-opencv-2-4-windows-7-visual-studio
Here is the full list of steps:
set system var OPENCV_DIR = install_dir\build
set system var TBBROOT = tbb_install_dir
path += ;%OPENCV_DIR%\x86\vc10\bin;%TBBROOT%\bin\ia32\vc10
create empty project: File->New->Project->Win32ConsoleApp
add the following items in project->Properties:
ConfigProperties->VC++Dirs->Include: $(OPENCV_DIR)\include;$(TBBROOT)\include
Linker->General->AdditionalLibDirs: $(OPENCV_DIR)\x86\vc10\lib;$(TBBROOT)\lib\ia32\vc10
Linker->Input->AdditionalDeps: add lib items from opencv and tbb (in Debug and Release modes).
for details of which files to include, see http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
download image-display test file from above site, save it in the project dir. But the Test.cpp in that page requires more inputs, so it does not work easily. Instead, use the code from http://docs.opencv.org/doc/tutorials/introduction/display_image/display_image.html#display-image
Properties->ConfigProps->Debugging->CommandArgs: mention file name to be loaded
Tools->Option->Debugging->Symbol->MS-Server=yes (this removes most of the "PDB not found" errors)
Tools->Settings->ExpertSettings=on (this also removes some errors)
copy tbb_debug.dll and tbb.dll from TBBROOT\bin\ia32\vc10 to the project dir (I dont know why these are not automatically picked up with the settings done above)
Ctrl+F5 to run (start without debugging)
i think your installation is OK. just need to configure with VS
in Project Properties > C/C++ >
Add Additional Include Directory: C:\opencv\build\include;C:\opencv\build\include\opencv
C/C++ > Linker > Input add Additional Dependencies :
C:\opencv\build\x86\vc9\lib\opencv_core231.lib
C:\opencv\build\x86\vc9\lib\opencv_flann231.lib
C:\opencv\build\x86\vc9\lib\opencv_highgui231.lib
C:\opencv\build\x86\vc9\lib\opencv_imgproc231.lib
and more if needed
add OPENCV_DIR environment variable with value C:\opencv\build\x86\vc10\bin
more detail follow this OpenCV 2.1 with MS Visual Studio
We just set up TFS 11 for the first time. Running a gated check in, it succeeds but returns this message:
'srctool.exe' returned an unexpected exit code: '-1'. An error
occurred when opening a file "CustomDllName.dll": Assembly
"CustomDllName.dll" is not a valid .NET assembly and will be skipped
for analysis.
Well, it's right: that file is a legacy Visual Basic 6 DLL that we don't have much control over. It's included in the project for COM access to some of the methods.
Is there a way to instruct srctool.exe/TFS to skip that file when doing the inspection? Or another way to attack this?
Here is the solution that ultimately worked for me
A member of the TFS 11 team at Microsoft mentioned to me that the problem is due to a change in behavior that the Windows 8 team made to the srctool.exe tool.
By copying this file from the Windows 7 SDK (WinDBG) toolkit and overriding the one included in TFS 11 Beta, I was able to successfully run a build without any errors.
Is this a srctool.exe error from the shipped IndexSources activity? srctool.exe in this activity does one thing, which is to list the source files information in the pdb. I am not a srctool expert so I don't know why it fails in this case. I do know that srctool.exe has some behavioral changes in version 11, most of those are fixes from the previous version.
There is a workaround which requires udpating the build template. It is not very nice but it works. Srctool.exe is run (inside IndexSources activity) for each pdb file in the SymbolFiles collection. Now that you know which pdb fails, you can update the build template to add a RemoveFromCollection activity before the IndexSources activity that remove the troubled pdb from the SymbolFiles collection. This is by far the most straightforward workaround I can think of.
Alternatively, you can edit FindMatchingFiles activity's search pattern to exclude the pdb files you don't want to have sources indexed.
Based on the error message you got, it doesn't seem to be related to the known issue Ed mentioned. We fixed this issue for the next release, so if it's related, it should be fixed :-)
Let me know if you have any issue with VS11 Beta around the build templates.
Thanks.
I am debugging a bpg with multiple dll's. Can someone tell me why my breakpoints, that DO work, eventually stop working? The only way to get them back is to do a build all in my project group file (BPG file in Delphi 6)?
I have looked at several other posts, but have not had much luck getting an answer to this specific question. Again, I can successfully debug, all dll's in the BPG provided I do a build all. Doing a build all every time is taking too long.
I am using Delphi6 in WinXP.
Thank you
In Delphi 6, such a failure to find debug information (all the blue lines are gone from your sources) that is solved by a complete rebuild is usually a symptom that you have to examine your project (.dpr) settings. For each project (dll or exe) make sure a different unique compiler output folder (DCU output folder) is used.