opened
dotMorten
username_0
**Describe the bug**
I can't use this library from another library that references AnyCPU.
There's no reason why this library can't be used by an AnyCPU library, except you have a build task preventing me from doing that.

**Steps to reproduce the bug**
1. Create an AnyCPU class library.
2. Reference this package.
3. Build

**Expected behavior**
Build completes.

**Screenshots**
![image](https://user-images.githubusercontent.com/1378165/56379593-ea115700-61c4-11e9-9ae1-479241207d69.png)

**Version Info**
Win10, 1809, VS2019.

NuGet package version: 
2.1.190405004


**Additional context**
The build error is valid for app-heads, but not class libraries.
There shouldn't be an build error for libraries targeting AnyCPU
issue
created
jevansaks
username_1
I was under the impression that if your package contained native dlls then the whole app needs to be compiled as native per-platform. Maybe this has changed?

If there's a doc explaining how to do this, we'd be happy to support it. Have you seen a project that has been able to make this work?

Also note that your error is about the **VCLibs** dependency, not Microsoft.UI.Xaml.
comment
created
dotMorten
username_0
Yes but I'm not compiling an app, but just a class library.
comment
created
dotMorten
username_0
Yes. I work on the ArcGIS Runtime SDK for .NET. It does this and works just fine. https://www.nuget.org/packages/Esri.ArcGISRuntime.UWP/
comment
created
dotMorten
username_0
Avoiding vclibs reference:
```xml
  <ItemGroup Condition="'$(ProjectExt)' != '.vcxproj' and ('$(PlatformTarget)' == 'x86' or '$(PlatformTarget)' == 'x64' or '$(PlatformTarget)' == 'ARM' or '$(PlatformTarget)' == 'ARM64')">
     <SDKReference Include="Microsoft.VCLibs, Version=14.0" />
  </ItemGroup>
```
comment
created
dotMorten
username_0
I noticed there's `SkipMicrosoftUIXamlCheckTargetPlatformVersion` I can use to at least turn the version check off. That'll do for that bit
comment
created
jevansaks
username_1
You should also be able to have your component library build against the previous 2.1 -prerelease package which doesn't force in the SDKReference dependency like this. The APIs are the same so your component would be compatible. I think that would unblock you for now.

But I'm taking a look into making this change.
comment
created
dotMorten
username_0
@username_1 I've submitted a PR for review
comment
created
jevansaks
username_1
I missed this in the initial report. The 17763 target version dependency is required because you need to compile against a new enough Windows SDK in order for the metadata references in the MUX package's winmd to be resolved. If it's too old you'll get weird compiler errors about type references.

For the MinVersion check: I still kind of like having it because I'd like you to know that our project needs a particular min version in case you're trying to promise something more than we can offer. Is it tripping because the MinVersion in your component is unset, perhaps? I can set up a repro project to investigate.
comment
created
dotMorten
username_0
Setting `SkipMicrosoftUIXamlCheckTargetPlatformVersion` works for me. I can continue targeting 16299.
I don't think this check really applies for a class library. The specific underlying APIs are needed until runtime.
comment
closed
jevansaks
username_1
issue