I am running Embarcadero RAD Studio 10.1 Berlin Update 2 on Windows 10.
My IDE environment worked fine yesterday. I compiled and build successfully using the IDE. My normal operation before running and debugging my project is to compile a couple libraries and then build my executable. Once that is done, then I'll run the executable to check out the functionality and debug etc.
This morning I compiled my libraries, as I always do, and I received the following error:
[bcc32 Error] dstring.h(17): E2209 Unable to open include file 'System.Internal.StrHlpr.hpp'
Full parser context
File.cpp(2): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\vcl\vcl.h
vcl.h(10): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\vcl\basepch0.h
basepch0.h(62): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\rtl\System.hpp
System.hpp(1599): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\rtl\sysclass.h
sysclass.h(46): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\rtl\dstring.h
I have ensured no pending changes exist in my local source and versioning.
I have tried cleaning, recompiling, and rebuilding.
My computer did run a Windows Update this morning. The following two were installed:
Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB4015438)
Update for Microsoft Outlook 2013 (KB3141495) 32-Bit Edition
I also checked out the files at the following referenced path: C:\Program Files (x86)\Embarcadero\Studio\18.0\include\windows\rtl
The file dates don't appear to suggest any changes were made recently to these files located withinn the rltl folder.
I have also tried restarting my computer.
What would cause something like this to happen and how would I go about resolving this?
System.Internal.StrHlpr.hpp is included in runtime library files when initially installing RAD Studio Berlin 10.1 Update 2.
By running the RAD Studio installer again and clicking repair installation during the process, this missing file is recovered and can again be found in the rtl folder: C:\Program Files (x86)\Embarcadero\Studio\18.0\include\windows\rtl\ allowing for successful compiling and building.
Related
I am setting up a new TeamCity build agent. Several build configurations that run perfectly well on the existing agent are failing on the new agent, with errors like this (whitespace added for clarity):
[22:14:32][someproject.vbproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\Microsoft.VisualBasic.CurrentVersion.targets(322, 5):
error MSB4019: The imported project
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\Roslyn\Microsoft.VisualBasic.Core.targets"
was not found.
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Note the path on line three after "The imported project". The error is correct; the folder does exist but the file does not exist there. However the Microsoft.VisualBasic.Core.targets file does exist at a slightly different path
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Roslyn\Microsoft.VisualBasic.Core.targets
Is there an easy fix for this, perhaps a registry entry telling MSBuild where to look?
Cause
On your machine, there are two copies of VS 2017 installed, Professional edition and the raw Build Tools.
You didn't install VB bits for Professional, while did that for Build Tools.
TeamCity prefers MSBuild from Professional edition.
Combine all above, the issue happened.
Fix
You should either force TeamCity to use MSBuild from Build Tools, or add VB to your VS Pro installation.
Reference
https://blog.lextudio.com/the-rough-history-of-msbuild-cc72a217fa98
I am using VS2017, MSBuild version 15.0. I have been installing taichi(https://github.com/yuanming-hu/taichi) .I have been facing lots of errors and trying to solve each step by step and now I am stuck with the following error. I have MSbuid 15.0 but it is looking for version 4.0 .
Build FAILED.
"C:\Users\5000\Documents\spgrid_topo_opt-master\taichi-master\build\taichi.sln" (default target) (1) ->
"C:\Users\5000\Documents\spgrid_topo_opt-master\taichi-master\build\ZERO_CHECK.vcxproj" (default target) (2) ->
(SetTelemetryEnvironmentVariables target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.DesignTi
me.targets(491,5): error MSB4062: The "SetEnv" task could not be loaded from the assembly C:\Program Files (x86)
\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll. Could not
load file or assembly 'Microsoft.Build.Utilities.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f
7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask>
declaration is correct, that the assembly and all its dependencies are available, and that the task contains a p
ublic class that implements Microsoft.Build.Framework.ITask. [C:\Users\5000\Documents\spgrid_topo_opt-master\tai
chi-master\build\ZERO_CHECK.vcxproj]
0 Warning(s)
1 Error(s)
1.Please open Developer Command Prompt for VS2017(come with build tools) and type the build command like: msbuild ZERO_CHECK.vcxproj
2.Check if it makes any difference,if same issue persists open vs installer and update the build tools to latest version. Then build the C++ project to check if it helps
I configured the similar environment like yours. And use the SetEnv task in .vcxproj file. But all works well when building the project.
So if all above can't work to resolve the issue: There is possibility that you call msbuild programmatically in code. If so, maybe you can get some help from this issue:
Try binding redirection, thanks to Nicolas.
Also, you can check this thread.
Any update feel free to contact me:)
Edit your PATH environment variable to ensure the first path to a directory containing msbuild.exe is the one included with Visual Studio 2017. This may be one of the following paths, depending on the edition you have and whether you installed it to the default location.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\
I tried to build the openjdk9 source code in Windows 10 by the following commands
go to D:\jdk9\jdk9 with cygwin
./configure -with-freetype=/cygdrive/c/freetype -enable-debug -with-target-bits=64
make all
Finally it build successfully with messages :
Creating support/demos/image/jfc/Font2DTest/Font2DTest.jar
Creating support/demos/image/jfc/Metalworks/Metalworks.jar
Creating support/demos/image/jfc/Notepad/Notepad.jar
Creating support/demos/image/jfc/TableExample/TableExample.jar
Creating support/demos/image/jfc/TransparentRuler/TransparentRuler.jar
Creating support/demos/image/jfc/SampleTree/SampleTree.jar
Creating jre jimage
Creating jdk jimage
WARNING: Using incubator modules: jdk.incubator.httpclient
WARNING: Using incubator modules: jdk.incubator.httpclient
Finished building target 'all' in configuration 'windows-x86_64-normal-server-fastdebug'
However how to import the project such as jdk or Hotspot to visual studio? There is neither no solution file nor project file generated, also there is no create.bat file exist in folder \jdk9\hotspot\make (openjdk 8 has the file), so how to import the jdk/Hotspot source code to the visual studio 2017 to debug the source code?
To build VS Project Creator run the following command from the openjdk9 top directory:
make hotspot-ide-project
In my case, the generated VS project files are located in:
.../openjdk9/build/windows-x86_64-normal-server-slowdebug/ide/hotspot-visualstudio
Finally, find the jvm.vcxproj file in the hotspot-visualstudio directory and open it.
How do I target MSBuild 15.0 on my server? I have 15.0 installed on the server but my project is still building with 14.0. I know that Microsoft has made some changes to the directory locations and no longer uses the registry values with 15.0.
I found 15.0 installed in the following locations:
C:\Program Files (x86)\MSBuild\15.0
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild
And I have the .Net framework 4.6.2 installed here:
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
Thanks!
Product: BuildMaster
Version: 5.7.2
Update 1:
Responding to #emiel-koning, I tried to specify $MSBuildToolsPath in the build step using:
set $MSBuildToolsPath = C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin;
But I get this error:
error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not found. Also, tried to find "WebApplications\Microsoft.WebApplication.targets" in the fallback search path(s) for $(VSToolsPath) - "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths.
Update 2:
Could I be missing something installed on my build server? I installed Visual Studio Build Tools which gave me the MSBuild 15.0 but not the WebApplication.targets file from the error above
SOLUTION
I fix my issues by also installing "Web development build tools" component. I also set the $MSBuildToolsPath at the server level until I can roll out the new MSBuild globally.
In general, this is handled by the ToolsVersion attribute of the project file. This should be what is used if the below configuration is not specified.
In BuildMaster specifically, you can override this value per-server on the Administration > BuildMaster Extensions > Windows SDK > Configuration tab. Click on $MSBuildToolsPath (and optionally override at a specific scope) with a value of C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin
Response to Updates #1 & #2:
First, don't set that variable in the plan itself (otherwise you'd have to set it in every plan). Set it in the manner I described above. Personally, I always specify its value at the server level since each server may have it installed in a different location.
As for Microsoft.WebApplication.targets, I think the only supported method of building web application projects is to have Visual Studio installed on the build server; though in the past I've just copied the targets from my local installation (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications) into the path that MSBuild is expecting them to be.
Can you use $MSBuildToolsPath to specify the correct path to MSBuild?
I have downloaded libsvm-3.17 package. Extracted the files. I go to 'tools' folder to try using grid.py to look for suitable c and g with the dataset provided in the package, i.e. heart_scale.
However, the following is what I get
Traceback (most recent call last):
File "C:...\Documents\libsvm-3.17\tools\grid.py", line 266, in run
if rate is None: raise RuntimeError('get no rate')
RuntimeError: get no rate
worker local quit.
Can someone help me figure out how to solve this problem.
Thank you very much.
You may need to scale the data in advance. I got the same problem and it sorted out after I scaled the data. Hope this help.
Firstly, if you are a newbie in libsvm, I would recommend you to try easy.py instead of grid.py. Secondly, before executing anything you have to compile libsvm, for compiling follow instructions given in README file (You must ensure nmake.exe, cl.exe, link.exe are in system path), here is what it says:
Windows binaries are in the directory `windows'. To build them via
Visual C++, use the following steps:
Open a DOS command box (or Visual Studio Command Prompt) and change to libsvm directory. If environment variables of VC++ have not
been set, type
"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
You may have to modify the above command according which version of
VC++ or where it is installed.
Type
nmake -f Makefile.win clean all
(optional) To build shared library libsvm.dll, type
nmake -f Makefile.win lib
Another way is to build them from Visual C++ environment. See details
in libsvm FAQ.
Once you have it installed you can start working with easy.py and grid.py.
This is what I tried on both a 64 bit and a 32 bit machine and grid.py works fine.
I have added the default install directories, if your installation directories are different modify accordingly.
Open command prompt and type
C:\Program Files (x86)\Microsoft Visual Studio xx\VC\bin\amd64\vcvars64.bat for 64 bit systems
OR C:\Program Files (x86)\Microsoft Visual Studio xx\VC\bin\vcvars32.bat for 32 bit systems.
Navigate to libsvm directory in the same command prompt and run
C:\Program Files (x86)\Microsoft Visual Studio xx\VC\bin\amd64\nmake.exe -f Makefile.win for 64 bit systems
OR C:\Program Files (x86)\Microsoft Visual Studio xx\VC\bin\nmake.exe -f Makefile.win for 32 bit systems
The binaries should be built successfully in the libsvm-3.xx\windows folder
Run grid.py with your options
Within grid.py the gnuplot.exe is usually set at tmp which never worked for me so I changed the gnuplot executable path in my grid.py to the following:
self.gnuplot_pathname = r'C:\\Program Files (x86)\\gnuplot\\bin\\pgnuplot.exe'
If you use the option -log2p to run grid.py, you will get output get no rate. With grid.py, you can't use -log2p option.(No matches for searching -log2p in grid.py)
You can use -log2p option in gridregression.py.