I was using msbuild build my sln and get error message "couldn't find 'AxImp.exe' which already exists under %Program files (x86)%\Microsoft sdks\windows\v8.1A. but seems it find sdk from v8.0A, output info point out the error was in Microsoft.Common.targets file(code see below). I didn't found where the "TargetFrameworkSDKToolsDirectory" was defined, anyone can help me?
environment: winblue(4.5.1 sdk v8.1A) without visual studio.
<ResolveComReference
TypeLibNames="#(COMReference)"
TypeLibFiles="#(COMFileReference)"
ResolvedAssemblyReferences="#(ReferencePath)"
WrapperOutputDirectory="$(InteropOutputPath)"
IncludeVersionInInteropName="$(IncludeVersionInInteropName)"
KeyContainer="$(KeyContainerName)"
KeyFile="$(KeyOriginatorFile)"
DelaySign="$(DelaySign)"
StateFile="#(_ResolveComReferenceCache)"
TargetFrameworkVersion="$(TargetFrameworkVersion)"
TargetProcessorArchitecture="$(ProcessorArchitecture)"
NoClassMembers="$(ComReferenceNoClassMembers)"
Silent="$(ResolveComReferenceSilent)"
EnvironmentVariables="$(ResolveComReferenceEnvironment)"
**SdkToolsPath="$(ResolveComReferenceToolPath)"**
ExecuteAsTool="$(ComReferenceExecuteAsTool)"
MSBuildArchitecture="$(ResolveComReferenceMSBuildArchitecture)"
ContinueOnError="$(ContinueOnError)">
<**ResolveComReferenceToolPath** Condition="'$(ResolveComReferenceToolPath)' == ''">$(**TargetFrameworkSDKToolsDirectory**)</ResolveComReferenceToolPath>
Depends on the version and platform you're targeting, but latest is at C:\Program Files (x86)\MSBuild\12.0\Bin\Microsoft.NetFramework.CurrentVersion.props, follow your imports, i.e. <Import Project=".targets" />. To get the values run MSBuild with /v:diag and all evaluated properties will be dumped and the start.
what ended up working for me was installing:
Windows Software Development kit (SDK) for windows 8
even though I'm on widows server 2016
https://developer.microsoft.com/en-us/windows/downloads/windows-8-sdk
I guess the clue was in my error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2428, 5): error MSB3086: Task could not find "LC.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
Related
I've got a solution in Visual Studio that includes a Dotfuscator project. The exact same code base builds and obfuscates correctly on another machine (my old laptop), but not on my newly setup laptop. Of course we let our support contract expire since this is used on a legacy project.
The output during the build is:
8>Compiling Project MyAppObfuscation ...
8>Dotfuscator Professional Version 4.41.1.9417-95d9eec7a
8>Copyright 2002-2019 PreEmptive Solutions, LLC All Rights Reserved.
8>Use of this software implies acceptance of accompanying license agreement.
8>Build machine license. This software may be used on binaries for general release.
8>
8>Your protection is out of date. Learn more at https://www.preemptive.com/keep-your-protection-up-to-date?product=dotfuscator&sku=pro&version=4.41.1.9417. Upgrade at https://www.preemptive.com/products/dotfuscator/downloads.
8>
8>Loading Assemblies...
---several of these lines---
8>Running ...\ildasm.exe /OUT=...\MyApp.exe.il /TEXT /NOBAR /RAWEH /QUOTEALLNAMES /UTF8 /LINENUM /FORWARD "...\MyApp.exe"
8>
--- immediately followed by: ---
8>Encountered - at line 18065, column 26.
8>Was expecting one of:
8> <FLOAT64> ...
8> "float64" ...
8> "float32" ...
8> <INT> ...
8> "(" ...
8>
8>Build Error.
8>MyAppObfuscation build failed.
Has anyone encountered this? I'm inclined to believe it's something on the new machine, but if anyone has tips about diagnosing this I would appreciate it.
Thanks!
Edit: Just wanted to add the same error happens in Visual Studio and the Dotfuscator Professional Config Editor.
Edit 2: Upon further inspection, the folder listed in the /OUT parameter of ildasm doesn't contain a .il file for the last ildasm command. The output folder for the assemblies prior to the .exe DO have a .il file. So, I thought ildasm might be failing on the .exe, but I can copy the command into a command prompt and it runs correctly and creates an .il file as expected. So, why would ildasm not work when run from Visual Studio, but would work from the command line -- and only for one assembly / exe in the project?
The mystery grows...
Solved it! I opened Visual Studio Installer on both the old and new machine to compare what features were installed on the old one vs the new one. Most notably, one of the missing features on the Individual components tab was an older .NET Framework SDK (4.6.1 in my case) and an older Windows 10 SDK (10.0.17763.0 in my case).
I hope someone else finds this helpful.
I am facing issue getting my project to build on server. The same project build fine locally on my machine (VS 2017 15.8). Teamcity sever also has the same msbuild tool version installed. It doesn't have VS 2017.
Project build on server results in following error:
"error CS0433: The type 'OracleCommand' exists in both
'Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral,
PublicKeyToken=89b483f429c47342' and 'Oracle.ManagedDataAccess,
Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'
So far I have been able to pin point the cause of the error to due to autounify not triggering/working at resolving package reference (I am using package reference for nuget packages) for project build.
I also confirmed that teamcity server doesn't contain Microsoft.NET.Build.Extensions.
Any idea on how shall I proceed towards resolving this issue. I know installing VS 2017 on TC server will likely resolve this, but that's not an option now. Any ideas people?
Here's how I solved the problem on team-city server:
- Copied Microsoft.NET.Build.Extensions folder from my local machine to MSBuild/Microsoft older
- Copied Microsoft.NET.Build.Extensions.targets file to MSBuild\15.0\Microsoft.Common.Targets\ImportAfter folder
Above steps resolved the build issue on TC server.
While building the Windows environment for OsQuery (on my Windows 10 VM) from their website(link: https://osquery.readthedocs.io/en/stable/development/windows-provisioning/), I am getting the msb1009 error during the phase where I have to run the tools\make-win64-binaries.bat command. I get the following result after running that command:
CMake Error at CMakeLists.txt:402 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/osquery/build/windows10/CMakeFiles/CMakeOutput.log".
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: osquery.sln
[-] osquery build failed.
I have been trying to make the osquery.sln file using that command and have looked online for solutions but without any success. Any help would be much appreciated!
Thanks in advance
Edit: Here is the output of running tools\make-win64-dev-env.bat and tools\make-win64-binaries.bat
tools\make-win64-dev-env.bat
tools\make-win64-dev-env.bat (contd..)
tools\make-win64-binaries.bat
Could you paste the full output of running the tools\make-win64-dev-env.bat and tools\make-win64-binaries.bat? Also have you tried closing out your shell and re-opening, or even worse -- reboot the system?
I ask because, as you note, it seems like the solution file never gets generated, which usually means there was either a missing dependency during provision, or some other issue when the script first ran. On first provision it's typically the case that a system reboot is needed, as Visual Studio community typically requires one. Further, we set a few shell environment variables that are leveraged during the build process, however those are supposed to be set at the end of the provisioning script.
Also feel free to hit us up in our Slack and check out the #windows channel :)
After a lot of code reading, researching online and trial and error, I found out that after a clean OS install, one would need to install git and then immediately clone the osquery repository on the user desktop rather than System32. This worked fine, at least for me. Just make sure to switch directories when opening command line with administrator mode.
I have difficulties updating my development machine to use the newest Visual Studio tools to support my development.
I did the following (VS2015 means Visual Studio 2015 Community Edition):
Uninstall my previous version of VS2015 Update 1. I should mention that I have installed various stuff on top of this such as AspNet5.ENU.RC1_Update1_KB3137909.exe and VWDOrVs2015AzurePack.exe (VS tools for Azure).
Restart
Install VS2015 using this file vs_community__55e913f53149d443afc7d14b09172fd9.exe. This ended with minor errors such as
[0EE0:0E48][2016-08-10T11:42:51]i301: Applying execute package: MobileServicesConnectedServices_VS, action: Install, path: C:\ProgramData\Package Cache{A4495E4F-5218-48FB-8AD2-F3076011B9E1}v14.0.23107\packages\MobileServicesConnectedServices\MobileServicesConnectedServices_VisualStudio14.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" NOVSUI="1"' [16DC:16E0][2016-08-10T11:42:58]i000: MUX: ExecuteError: Package (MobileServicesConnectedServices_VS) failed: Error Message Id: 1722 ErrorMessage: There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.
[0EE0:0E48][2016-08-10T11:42:58]e000: Error 0x80070643: Failed to install MSI package.
and
[0EE0:0E48][2016-08-10T11:42:45]i301: Applying execute package: AuthenticationConnectedServices_VS, action: Install, path: C:\ProgramData\Package Cache\{3FEAC561-1CF6-41D6-B0F3-BECDD9C88A1B}v14.0.23107\packages\AuthenticationConnectedServices\AuthenticationConnectedServices_VisualStudio14.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" NOVSUI="1"' [16DC:16E0][2016-08-10T11:42:50]i000: MUX: ExecuteError: Package (AuthenticationConnectedServices_VS) failed: Error Message Id: 1722 ErrorMessage: There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.
[0EE0:0E48][2016-08-10T11:42:51]e000: Error 0x80070643: Failed to install MSI package.
Restart
Now, if I try to install the VS2015 Tools Preview from a file called DotNetCore.1.0.0-VS2015Tools.Preview2.exe I get this error:
Setup has detected that Visual Studio 2015 Update 3 may not be completely installed. Please repair Visual Studio 2015 Update 3, then install this product again.
and when I open the log file I see this:
[1B14:1A6C][2016-08-10T12:58:43]e000: Error 0x81f40001: Bundle condition evaluated to false: WixBundleInstalled OR NOT(((VS2015CommunityUpdateVersion <> VS2015UpdateVersion) AND (VS2015CommunityExists) AND (VS2015UpdateVersionExists)) OR ((VS2015ProfessionalUpdateVersion <> VS2015UpdateVersion) AND (VS2015ProfessionalExists) AND (VS2015UpdateVersionExists)) OR ((VS2015EnterpriseUpdateVersion <> VS2015UpdateVersion) AND (VS2015EnterpriseExists) AND (VS2015UpdateVersionExists)) OR ((VS2015WebExpressUpdateVersion <> VS2015UpdateVersion) AND (VS2015WebExpressExists) AND (VS2015UpdateVersionExists))) OR (SKIP_VSU_CHECK=1) OR (WixBundleAction=2)
I am now trying to install from scratch using a fresh Windows 10 installation to avoid problems related to side-effects from earlier installations.
I'm curious though to find out, what might cause these problems, and find out if I am doing something wrong.
Edit 2016-08-10: I have now verified that the same error occurs on a freshly installed Windows 10.
I found the solution after some more digging. It turns out many people faced this problem as described here:
(Click the Reviews tab):
https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935
After trying this from a command prompt:
DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK=1
the installation continues.
Above didn't work for me, nor did several other solutions I found online, but this finally worked:
Go to extensions folder, e.g. C:\Program Files (x86)\Microsoft
Visual Studio 14.0\Common7\IDE\Extensions
There will be a lot of cryptically named folders, e.g. "kehkjkd2.pme"
Open each folder to see if it is a nuget extension folder (if it contains ~40 files named nuget.*.dll)
If it is a nuget extension folder, delete it or move it to a backup folder.
Repeat - there may be multiple folders containing nuget.
After doing the above and rebooting (not sure if the reboot is necessary), the .NET Core 1.0.0 VS 2015 Tooling Preview 2 install worked.
I have installed all third party setups required for "Multi Device Hybrid Apps" successfully. But when i go to run my app using Visual Studio 2013 it gives me following two errors :
Error 1: cmd: Command failed with exit code 255
Error 2: The command ""C:\Users\PC-Name\AppData\Roaming\npm\node_modules\vs-mda\vs-cli"
prepare --platform Android --configuration Debug --projectDir . --projectName "Test2"
--language "en-US"" exited with code 8.
I have checked all Environment Variables which are at there right variables.
Kindly tell me how to get rid off from above errors.....
Exit code 8 often indicates that at least one of the environment variables that Cordova requires for build has not been added to your path.
There are three environment variables that must be defined:
1) %JAVA_HOME% -- C:\Program Files(x86)\Java\jdk1.7.0_55
2) %ADT_HOME% -- C:\Users\YOUR_NAME_GOES_HERE\AppData\Local\Android\android-sdk
3) %ANT_HOME% -- C:\apache-ant-1.9.3
Note -- The paths for these tools may be different on your PC. You need to verify the actual install paths for each.
Once you have defined these variables, copy the entry below into your System path variable. Reboot PC after making these changes.
%JAVA_HOME%\bin;%ADT_HOME%\tools;%ADT_HOME%\platform-tools;%ANT_HOME%\bin;
A similar question was covered in an earlier post.
I figured out the real cause, just update your node.js or either remove spaces from project directory path.
For Example :
Before Project Directory Path : C:/Users/Jon Snow/MyProjects/ProjectName
After Project Directory Path : C:/Users/JonSnow/MyProjects/ProjectName