microsoft / opencv

Open Source Computer Vision Library
opencv.org
Apache License 2.0
144 stars 92 forks source link

Can't build test-vs2015 branch, error code: APPX1639 #39

Closed aniongithub closed 9 years ago

aniongithub commented 9 years ago

I'm getting the errors (44, specifically for all libs and test applications)

Severity Code Description Project File Line Error APPX1639 File 'Microsoft.Windows.Build.Appx.AppxPackaging.dll.manifest' not found. See http://go.microsoft.com/fwlink/?prd=12560&pver=1.0&plcid=0x409&ar=MSDN&sar=PlatformMultiTargeting&o1=UAP&o2=10.0.10069.0 for more information. libjasper C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets 765

But the link provided above doesn't seem to take me anywhere except the Microsoft home page and a google search fails to turn up anything related to either VS2015, Windows 10 Preview or OpenCV.

Any help is appreciated, thanks in advance!

mkostin commented 9 years ago

Hi, @ananthonline, what are Visual Studio and OS versions you are using?

aniongithub commented 9 years ago

Thanks for the quick reply. I'm using

Visual Studio 2015 RC Version 14.0.22823.1 D14REL Windows 10 Pro Insider Preview Build 10074

EvgenyAgafonchikov commented 9 years ago

Cannot reproduce on clean installation of Windows 10 Pro Insider Preview Build 10074 with the same VS2015 RC version (Community edition). Could you please provide more details. E.g. solutions from what folder are you trying to build and what configurations use (x86/x64, Debug/Release; However I've checked all these combinations for solutions from bin_VS2015_RC folder on my Windows 10 VM), if VS2015 has proper value of OCV2015_ROOT in its macros?

aniongithub commented 9 years ago

Here are more details

I'm building bin_VS2015_RC\WS\10.0\x64\OpenCV.sln, and yes, OCV2015_ROOT is set to the FULL path of the cloned folder. Configuration is x64, Debug/Release - both have the same error. Note that all projects themselves load fine, it fails at compile time with message above.

Since this is a message related to appx and manifests, is it possible that I need some settings in VS2015 turned on, or enable windows store development in any way?

EvgenyAgafonchikov commented 9 years ago

The only additional thing I did is choosing of "Custom" installation instead of "Typical" and checking of "Universal Windows App Development Tools"

vs2015

Enabling of developer mode should be necessary only for deploying and starting of Universal Apps, not for build. PowerShell way from there works for me

aniongithub commented 9 years ago

Did a complete clean re-install of my OS and VS 2015. Still the same error :(. Is it possible for you to provide binaries in the form of a nuget package? With the ability to package WinRT components, this will make it much easier for people to use the fruits of this project.

EvgenyAgafonchikov commented 9 years ago

Unfortunately I cannot repro this on my installation, so it's difficult to suggest something effective.

It looks like there is similar issue, however it is still unresolved.

Currently I can only suggest to try Long way. This should generate projects that are completely based on your local configuration. In case you need libraries only (not tests) use -DBUILD_TESTS=NO -DBUILD_PERF_TESTS=NO CMake flags to remove test projects from build, it should also considerably decrease build time.

mkostin commented 9 years ago

As per comments in the issue @EvgenyAgafonchikov referred to, most likely inappropriate SDK is used - 8.1 instead of 10

...
GetInstalledSDKLocations:
  Searching for SDKs targeting "UAP, 10.0.10069.0".
  Searching for SDKs targeting "Windows, 8.1".
...

@ananthonline could you check if you're having the same mismatch on your setup. The latest post on the thread also introduces a solution that you could try.

riverar commented 9 years ago

I have the same problem on both Windows 8.1 and Windows 10, community and enterprise SKUs of VS2015. My Windows 8.1 machine has multiple SDKs and VS SKUs installed, Windows 10 has just VS2015 fresh.

In both environments, I used the dev console to set the environment variable before launching devenv. How is Microsoft setting the variable?

mkostin commented 9 years ago

Hi, @riverar

  1. Do you have identical repro steps and error messages for both Windows 8.1 and 10 setups?
  2. Have you tried the approach referred above?

@ananthonline Have you been able to resolve this with your setup?

Since VS2015 is a common denominator for both cases I assume it is the reason. Admittedly, It's hard to help since we had no repro so far using a clean setup on our side.

riverar commented 9 years ago

Working on a repro now, standby.

riverar commented 9 years ago
  1. Install Windows 10 10130 from ISO
  2. Install Visual Studio 2015 RC Community Edition from web, custom (non-present in this list = not installed):
    • Microsoft Web Developer Tools
    • GitHub Extension for Visual Studio
    • Universal Windows App Development Tools
      • Tools and Windows SDK 10.0.10069
    • Windows 8.1 and Windows Phone 8.0/8.1 Tools
      • Tools for Windows 8.1 and Windows Phone 8.0/8.1
  3. Clone repo with either git cli or VS2015 tooling and switch to branch vs2015-samples. (Close VS2015 afterwards, if used.)
  4. Open Developer Command Prompt for VS2015
  5. Set OCV2015_ROOT appropriately (e.g. SET OCV2015_ROOT=C:\Sources\opencv)
  6. Within the command prompt, invoke vs2015\ws\10.0\arm\opencv.sln to open Visual Studio. (Complete VS OOBE as needed and skip sign in/ignore Developer Mode warnings.)
  7. Build > Build Solution
  8. Note APPX163 error.
  9. Close VS2015 and the command prompt.
  10. Change VS2015 installation, remove "Tools for Windows 8.1 and Windows Phone 8.0/8.1"
  11. Repeat steps 4-7.
  12. Note APPX163 error. Also note MSB3785 "No SDKs were found" warning.
riverar commented 9 years ago

Seems this is purely an environment issue.

The Developer Command Prompt for VS2015 defaults to the 8.1 SDK. Unsetting WindowsSdkDir (i.e. set WindowsSdkDir=) before invoking msbuild or devenv resolves the issue in that prompt. It's not clear if this is an issue with the batch or the Appx targets relying on WindowsSdkDir incorrectly.

Alternatives include using a normal command prompt and using the MSBuild Command Prompt for VS2015.

aniongithub commented 9 years ago

I'm glad this was figured out, but I'm still for publishing native Nuget packages. Managed interop libraries can then reference this package. I'll start a new feature suggestion about Nuget.

mkostin commented 9 years ago

@riverar, @ananthonline, thanks for feedback! We had several requests for this feature and looking into the possibility of having it on the roadmap.