Fix compilation with VS16.10 and later (#10208)

## Summary of the Pull Request

VS16.10 and later contain two regressions:
* Marking the use of `pshpack*.h` in system headers with C4103
* The newly included, builtin `AssemblyReference.xaml` is missing the `AssemblyReferences` project capability

## PR Checklist
* [x] I work here

## Validation Steps Performed

Built the project with VS16.10 and VS17.0.
This commit is contained in:
Leonard Hecker 2021-05-26 22:11:38 +02:00 committed by GitHub
parent 43d5713a02
commit 5d6eec6cde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 13 deletions

View File

@ -7,6 +7,7 @@ appx
appxbundle
appxerror
appxmanifest
ATL
backplating
bitmaps
BOMs

View File

@ -2,10 +2,7 @@ AAAa
AAAAA
AAAAAAAAAAAAA
AAAAAABBBBBBCCC
AAAAABBBBBBBCCC
AAAAABBBBBBCCC
AAAAABCCCCCCCCC
AAAAADCCCCCCCCC
abcd
abcd
abcde

View File

@ -183,7 +183,6 @@ bytebuffer
cac
cacafire
callee
cang
capslock
CARETBLINKINGENABLED
CARRIAGERETURN
@ -1368,7 +1367,6 @@ MEASUREITEM
megamix
memallocator
memcmp
memcopy
memcpy
memmove
memset
@ -1968,7 +1966,6 @@ rftp
rgb
rgba
rgbi
rgch
rgci
rgfae
rgfte
@ -2044,8 +2041,6 @@ scriptload
Scrollable
scrollback
scrollbar
Scrolldown
Scrolldownpage
Scroller
SCROLLFORWARD
SCROLLINFO
@ -2053,8 +2048,6 @@ scrolllock
scrolloffset
SCROLLSCALE
SCROLLSCREENBUFFER
Scrollup
Scrolluppage
scursor
sddl
sdeleted
@ -2069,7 +2062,6 @@ selectany
SELECTEDFONT
SELECTSTRING
Selfhosters
serializer
serializers
SERVERDLL
SETACTIVE

View File

@ -96,8 +96,17 @@
<TreatSpecificWarningsAsErrors>4189;4100;4242;4389;4244</TreatSpecificWarningsAsErrors>
<!--<WarningLevel>EnableAllWarnings</WarningLevel>-->
<TreatWarningAsError>true</TreatWarningAsError>
<!-- disable warning on nameless structs (4201) -->
<DisableSpecificWarnings>4201;4312;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<!--
C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
Caused by a regression in VS 16.10, it detects the use of /pshpack[1248].h/ in system headers.
C4201: nonstandard extension used: nameless struct/union
Conhost code uses a lot of nameless structs/unions.
C4312: 'type cast': conversion from 'A' to 'B' of greater size
Conhost code converts DWORDs to HANDLEs for instance.
C4467: usage of ATL attributes is deprecated
Conhost code still uses ATL.
-->
<DisableSpecificWarnings>4103;4201;4312;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>_WINDOWS;EXTERNAL_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>

View File

@ -31,6 +31,26 @@
</ProjectConfiguration>
</ItemGroup>
<!--
VS 16.10 contains a regression, which causes our solution to fail loading.
In Visual Studio you'll see:
Visual Studio ran into an unexpected problem with one or more projects.
You may need to reload affected projects or the solution to prevent further problems.
[Open log file] [Reload faulted project(s)]
The log file points to the following error:
System.InvalidOperationException: There is no project properties provider for "Persistence = AssemblyReference".
This error is caused by the following lines in our Microsoft.UI.Xaml dependency:
https://github.com/microsoft/microsoft-ui-xaml/blob/v2.5.0/build/NuSpecs/MUXControls-Nuget-Native.targets#L9-L11
See _DevDiv_ work item MSFT:1328040.
-->
<ItemGroup>
<ProjectCapability Include="AssemblyReferences" />
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
<!-- Turn off the 6+MB Windows.winmd that's emitted into our package