VS2013 - Msbuild fails Error MSB3086: Could not find AL.exe - visual-studio

I've recently upgraded to Windows 10 and i've stumbled upon an error when trying to build my solution in Visual Studio 2013 Ultimate.
The error is as follows:
Error 1 Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1A\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 Common.Resources
So the one thing that came to mind is to download / install the Windows 8.1 & 10 SDK, this didn't solve this issue however. The error is referring to Microsoft SDK v8.1a; Shouldn't it refer to v10.0?
So I opened up regedit and looked at the key location and the v10.0 folder is missing and the v8.1a folder is empty.
There are a couple of keys that when created should fix this error, i've tried creating them manually aswell but this didn't fix it either.
So, I tried changing the sdk toolset, there's supposed to be a option I should be able to change, so I opened the solution properties > Configuration Properties > Changed Configuration to 'All Configurations'. and the General node appeared to be missing...
All of this happened after upgrading to windows 10, it messed up the sdk toolset somehow, i've done alot of research for this problem and I couldn't find a proper solution. Any ideas?

I've managed to solve this problem; I decided to remove all the intalled SDKs then reinstall the latest Windows 10 SDK. Then I cleaned my solution and it built succesfully afterwards!

Related

Could not find SDK "WindowsMobile, Version=10.0.18362.0" error in VS17 when deploying to HoloLens

I'm new to HoloLens (and Microsoft's ecosystem) and am following this tutorial to learn. One of the steps is to deploy from Visual Studios to HoloLens, but when I try to I get this run-time error.
I have confirmed that I have followed this guide from Microsoft to set up my development environment, but my error still persists.
In Unity, these are by build settings and Player settings as instructed in the tutorial:
My Windows 10 computer is running on 1903, my HoloLens is on 1804, and I have both Windows SDK 10.0.17x and 10.0.18x installed on my computer (via Visual Studios installer and this link). I have also tested deploying the app using the 10.0.17x SDK, but end with the same results.
I can simulate my app from Unity using the Holographic Remoting app in HoloLens, but I just can't deploy it from Visual Studios. What is causing this error and how can I solve it?
Update:
I have tried re-installing the Windows 10 SDK (both 10.0.17x and 10.0.18x), but this did not resolve the problem. My Windows 10 SDK is installed in my D: drive if that would make any difference.
Update 2:
I read somewhere that if you simply delete those files from the project tree in Visual Studios, the error will go away. Indeed it did and I could build and run just fine after that seemly without issue, but there must be something wrong with deleting SDK files like that... Is deleting them safe?
Thank you for your help!
I managed to get this to work by deleting the reference to the Mobile SDK in the vxcproj file. It doesn't seem to be required!
App deployed to Hololens successfully!
According to the error message from the picture you post, there seems to be a problem with your Windows 10 sdk. Please check if the files in this directory are damaged (C:\Program Files (x86)\Windows Kits\10\Extension SDKs\WindowsMobile\10.0.18362.0), and try to reinstall the Windows10 SDK:https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk

Windows 7 Visual Studio "windows 8.1 required" on new project

I ran into some time consuming problems.
So basically I've been using VS 2015 for a while on Win7 64bit.
I installed the "Windows 8 Tools" because I tried to debug something for another version of windows. I played a lot to make that work, I think I changed the toolset locations maybe, but I don't know where that is and what the default would be.
The problem is when I uninstalled the Win8 toolsets from my Control Panel, then when I tried to enter one of my project, it said I needed to upgrade to windows 8.1 to load this project.
Even if I try to create a new JavaScript project it tells me I need to upgrade to Windows 8,1.
There is a weird message this is the link: (https://cdn.discordapp.com/attachments/183979885788659713/365283534644183065/unknown.png).
It says "Visual Studio 2013" I don't know why.
I've been googling for hours but I'm not even english and I don't find nothing I think my problem is too specific.
Maybe I miss something but can anyone help please?
Right now I'm desperate.
I uninstall with the cmd "D:\vs_entreprise.exe /uninstall /force" then reinstall, restarted, reset all settings to default in the "export and import settings" but same problem.
Thank you,
rt-2
I uninstalled all the framework I installed when I was trying to install the Win8 tools. Then VS told me that I was missing 4.6.something. I went into the CD and found "M:\packages\sdk_tools46\" and installed it, then I could open VS and create new projects. New projects are targeted for 10.

Windows SDK UWP App Error - DEP3321

I have been battling DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.14393.0 or higher. You currently are running version 10.0.10586.839. Please update your OS, or change your deployment target to a device with the appropriate version. for the past few days.
I have a UWP app which I cannot run on my machine. However, if I select one of the emulators, it runs fine. I have also set the minimum target value which ensures that the app runs, however, the app throws an error as it cannot find some methods in the lower version on the SDK.
I have tried repairing and uninstalling/re-installing both visual studio 2015 and 2017. I have tried the same with the various windows SDK as well. At one point i had three different versions of the SDK installed and visual studio was still complaining even though i had the updated version installed. Currently, I have installed win sdk 10.0.15063.17.
Any ideas what I can do next to resolve this issue. I have trawled various SO pages as well social.msdn pages with no luck.
Many thanks
I just started a new app and selected the highest Target levels and got this error. I was able to get rid of this error by selecting the default minimum Min Target Version as shown below.
I also encountered the same problem
Severity Code Description Project File Line Suppression State
Error DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.17763.0 or higher. You currently are running version 10.0.17134.648. Please update your OS, or change your deployment target to a device with the appropriate version.
Solution:
Right click on the project property and got to the General-> Target Platform Minimum version.
In my case, I changed it to "10.0.17134.0" by selecting from the drop-down and then rebuilt it.
I worked well. Attached snapshot for reference.
If your app is using APIs that only exist in newer versions of the OS (like 14393 or 15063), then you won't be able to call those on 10586. You will get an exception because the method simply doesn't exist on that machine.
In order to support the app on lower versions of the operating system you will need to wrap the calls to those APIs with an appropriate "IsAPIPresent" check:
https://learn.microsoft.com/en-us/uwp/api/Windows.Foundation.Metadata.ApiInformation
Thanks,
Stefan Wick - Windows Developer Platform
Possible Solution:
I was facing with the EXACT same issue. I have my SDK 15063, and I have installed Visual Studio 2017 afresh, which also installed SDK 15063 implicitly, but I still kept on getting the same deployment error DEP3321.
I solved this issue in this way -
Just go to the "Solution Explorer", on the right side of Visual Studio and do the following steps in this order -
1) Just right click on the project you are deploying
2) Press "Unload Project"
3) Right click on the project_name(unavailable) and press Edit project_name.jsproj. It will open an xml file on left hand side
4) Search for "TargetPlatformVersion" and "TargetPlatformMinVersion". Both are placed next to each other. Mine looked like this -
10.0.15063.0
10.0.15063.0
since mine Error DEP3321 explicitly stated that 'you are currently running version 10.0.14393.1715, so I replaced my "TargetPlatformMinVersion" from 10.0.15063.0 to 10.0.14393.1715 -
10.0.14393.1715
5) Now save it, Ctrl+S
6) Right click on "Solution Explorer" and press Reload Project and press Yes to the popup if you get stating that project is already loaded.
You are done. Just do what you normally do, Build (ctrl+shift+B) and then Debug - F5 or Ctrl+F5.
This way the project got deployed for me.

VB6 in Windows 10 can't Implements IDTExtensibility2

I still maintain many old VB6 applications, a few of them are ActiveX Dll that Implements IDTExtensibility2.
Today I opened one of them on Windows 10, tried to run it, and the line Implements IDTExtensibility2 was highlighted and the message "Compile error: Automation type not supported in Visual Basic" appeared.
I created a VirtualBox with Windows 7, installed VB6, and the same project works without problems.
I had Windows 10 for many months now and i'ts unlikely that I never opened any of the old the ActiveX Dll projects, but I don't remember if I did. My feeling is that I did, it was working and it has been broken recently, but I'm not sure because they are old projects and I open them very seldom for minimal maintenance.
Unfortunately I still need to maintain those antiques. Do I need to do the maintenance in the Windows 7 virtual machine? Or do I have a chance to get it to work in Windows 10?
Alternative fix if the #stenci SP6 reinstall solution doesn't work:
Open an administrative Command window. Issue the following commands:
regsvr32 /u "c:\Program Files (x86)\Common Files\DESIGNER\MSADDNDR.DLL"
regsvr32 "c:\Program Files (x86)\Common Files\DESIGNER\MSADDNDR.DLL"
As with the other solution, you may need to re-apply this fix after Windows 10 updates.
This fix got me going again with my VB6 Add-In project.
I finally found the solution: I had the wrong version of the service pack 6 installed.
Installing the correct version it solved the problem, and now I can finally (and sadly) use VB6 on Windows 10.
The correct version can be downloaded from here: https://www.microsoft.com/en-us/download/confirmation.aspx?id=7030
EDIT
When Microsoft pushes an update the problem pops up again. Trying to re-install the service pack fails showing a message about a phantom network folder.
In order to fix the problem after a Windows update right click on the file downloaded from the link above, uninstall, then double click on it to re-install, and all is good until the next Windows update.

MSBuild on CI Server can't find AL.exe

I'm having a problem on my TeamCity CI build server where during compilation I get the following error:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2342, 9): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". 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
I've found similar reports from a year ago when people were upgrading to .NET 3.5, for example this one. In that case, installing the latest SDK solved the issue, however I have already installed the latest SDK (Microsoft Windows SDK for Windows 7 and .NET Framework 4) on my build server. The MSBuild tools are all there on the server, in a folder called
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
and AL.exe exists in
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
However the registry key mentioned in the error message does not exist. So, it seems like there is something wrong with the installation/configuration of MSBuild. This error only happens for projects that have embedded resources, which require AL.exe.
As you have install the latest SDK (I'm assuming that's v7.1)
Go to "Microsoft Windows SDK v7.1" from the Start menu
Select "Windows SDK 7.1 Command Prompt" and enter
cd Setup
WindowsSdkVer -version:v7.1
This will tell msbuild to use that version of the tools without needing to do any scary registry editing.
Even though the question is quite old but it still appears in the top of google search results so I decided to post my solution as well. I have trapped into same issue while during TeamCity setup on Windows Server 2016 and Windows 10 Pro.
I have installed Microsoft Build Tools 2015 and Windows 10 SDK (Only tools for .NET 4.6.2) and got the error from question.
The missing puzzle was to set environment variable: TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools.
After setting environment variable MSBuild was able to resolve all needed tools including AL.exe and build succeeded.
Please let me know if same can be achieved by setting values in registry, but otherwise environment variables also works very well in this case and no installation of VS is needed.
You also need to apply the following registry fix to update msbuild to point to the V7.1 sdk values.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0]
"MSBuildToolsPath"="C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\"
"MSBuildToolsRoot"="C:\\WINDOWS\\Microsoft.NET\\Framework\\"
"FrameworkSDKRoot"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1#InstallationFolder)"
"MSBuildRuntimeVersion"="4.0.30319"
"SDK40ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1\\WinSDK-NetFx40Tools-x86#InstallationFolder)"
"SDK35ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1\\WinSDKNetFx35Tools#InstallationFolder)"
"MSBuildToolsPath32"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0#MSBuildToolsPath)"
I had the same problem there, here's my simple answer to this.
After you have installed the Microsoft Windows SDK 7.1 on the TeamCity Server.
In Regedit Change this key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0\SDK40ToolsPath
to
$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools-x86#InstallationFolder)
Follow the below steps. This worked perfectly to me. Saved my time.
1- Right-click the My Computer icon and choose Properties, or in Windows Control Panel, choose System.
2- Choose Advanced system settings.
3- On the Advanced tab, click Environment Variables.
4- Click New to create a new environment variable under User variable section.
5- Variable name: TargetFrameworkSDKToolsDirectory
6- Variable value: TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools
Variable value depends on your SDK installation path.
7- Click OK and Save all windows.
8- Restart Visual Studio.
I have a simple, effective fix.
The problem seems to be that the tools version delivered with Visual Studio is version 7.0A, while the version delivered with the Windows SDK is version 7.1. That's all very well, but MSBuild.exe is still looking for the version 7.0A registry keys, which don't exist. This has to be a bug!
Looking in my registry, all the information for V6.0 and V7.1 is present and correct. So my solution is simple. I created a registry link that makes an alias of the 7.1 keys.
It's not possible to create registry links using the built-in tools, so I downloaded a little utility called 'regln' from here.
C:>regln-x86.exe "\Registry\Machine\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" "\Registry
\Machine\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1"
Job done. MSBuild now works perfectly on the TeamCity server.
Add a system env variable TargetFrameworkSDKToolsDirectory
like this:
TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools
restart VS
Ran into the same issue setting up a new build server on Windows 10.
Found and installed the latest (at the time) Microsoft Windows SDK for Windows 7 and .NET Framework 4 and that solved the problem.
We recently had this problem trying to get our .Net 4.0 builds working. We found that the location of al.exe had changed between where the original MSBuild that came with .Net 4.0 looks, and the Visual Studio SDK for .Net 4.0 (which was released later).
Since the only standalone installation of the SDK tools available is the one we had already installed without success (the one you mentioned), the only solution we could think of was to install Visual Studio on the build agents. We put Visual Studio 2010 Express (to keep the installation as lightweight as possible) on there and the problem went away. Not a pretty solution, but it did work - installing VS2010 also installs the SDK tools of the specific version that MSBuild appears to be looking for.
This is a problem that really shouldn't happen, but there didn't seem to be a way of making MSBuild look in the correct place for the tools, even hacking around in the registry.

Resources