Skip to content

Commit e7451be

Browse files
committed
Upgrade Build and CI scripts
Rename Solution file. Update Azure DevOps CI script. Use VS2022 to build the project. Replace Cake Build tasks with PowerShell scripts. Remove Cake Build dependency for building the project.
1 parent d53f02c commit e7451be

28 files changed

+444
-955
lines changed

.gitignore

+118-84
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33

4+
# Working folders
5+
~build/
6+
~publish/
7+
~packages/
8+
49
# User-specific files
10+
*.rsuser
511
*.suo
612
*.user
713
*.userosscache
814
*.sln.docstates
9-
*.filters
10-
11-
# User-specific files (MonoDevelop/Xamarin Studio)
12-
*.userprefs
13-
14-
# Working folders
15-
~build/
16-
~publish/
17-
~packages/
1815

1916
# Build results
2017
[Dd]ebug/
@@ -23,38 +20,63 @@
2320
[Rr]eleases/
2421
x64/
2522
x86/
23+
[Ww][Ii][Nn]32/
24+
[Aa][Rr][Mm]/
25+
[Aa][Rr][Mm]64/
2626
bld/
2727
[Bb]in/
2828
[Oo]bj/
29+
[Ee]xt/
30+
[Ll]og/
31+
[Ll]ogs/
2932

30-
# Visual Studio 2015 cache/options directory
33+
# Visual Studio 2015/2017 cache/options directory
3134
.vs/
35+
# Uncomment if you have tasks that create the project's static files in wwwroot
36+
#wwwroot/
37+
38+
# Visual Studio 2017 auto generated files
39+
Generated\ Files/
3240

3341
# MSTest test Results
3442
[Tt]est[Rr]esult*/
3543
[Bb]uild[Ll]og.*
3644

37-
# NUNIT
45+
# NUnit
3846
*.VisualState.xml
3947
TestResult.xml
48+
nunit-*.xml
4049

4150
# Build Results of an ATL Project
4251
[Dd]ebugPS/
4352
[Rr]eleasePS/
4453
dlldata.c
4554

46-
# DNX
55+
# Benchmark Results
56+
BenchmarkDotNet.Artifacts/
57+
58+
# .NET Core
4759
project.lock.json
60+
project.fragment.lock.json
4861
artifacts/
4962

63+
# ASP.NET Scaffolding
64+
ScaffoldingReadMe.txt
65+
66+
# StyleCop
67+
StyleCopReport.xml
68+
69+
# Files built by Visual Studio
5070
*_i.c
5171
*_p.c
52-
*_i.h
72+
*_h.h
5373
*.ilk
5474
*.meta
5575
*.obj
76+
*.iobj
5677
*.pch
5778
*.pdb
79+
*.ipdb
5880
*.pgc
5981
*.pgd
6082
*.rsp
@@ -64,7 +86,9 @@ artifacts/
6486
*.tlh
6587
*.tmp
6688
*.tmp_proj
89+
*_wpftmp.csproj
6790
*.log
91+
*.tlog
6892
*.vspscc
6993
*.vssscc
7094
.builds
@@ -79,17 +103,21 @@ _Chutzpah*
79103
ipch/
80104
*.aps
81105
*.ncb
106+
*.opendb
82107
*.opensdf
83108
*.sdf
84109
*.cachefile
110+
*.VC.db
111+
*.VC.VC.opendb
85112

86113
# Visual Studio profiler
87114
*.psess
88115
*.vsp
89116
*.vspx
117+
*.sap
90118

91-
# TFS 2012 Local Workspace
92-
$tf/
119+
# Visual Studio Trace Files
120+
*.e2e
93121

94122
# Guidance Automation Toolkit
95123
*.gpState
@@ -99,84 +127,82 @@ _ReSharper*/
99127
*.[Rr]e[Ss]harper
100128
*.DotSettings.user
101129

102-
# JustCode is a .NET coding add-in
103-
.JustCode
104-
105130
# TeamCity is a build add-in
106131
_TeamCity*
107132

108133
# DotCover is a Code Coverage Tool
109134
*.dotCover
110135

111-
# NCrunch
112-
_NCrunch_*
113-
.*crunch*.local.xml
136+
# AxoCover is a Code Coverage Tool
137+
.axoCover/*
138+
!.axoCover/settings.json
114139

115-
# MightyMoose
116-
*.mm.*
117-
AutoTest.Net/
140+
# Coverlet is a free, cross platform Code Coverage Tool
141+
coverage*.json
142+
coverage*.xml
143+
coverage*.info
118144

119-
# Web workbench (sass)
120-
.sass-cache/
145+
# Visual Studio code coverage results
146+
*.coverage
147+
*.coveragexml
121148

122149
# Installshield output folder
123150
[Ee]xpress/
124151

125-
# DocProject is a documentation generator add-in
126-
DocProject/buildhelp/
127-
DocProject/Help/*.HxT
128-
DocProject/Help/*.HxC
129-
DocProject/Help/*.hhc
130-
DocProject/Help/*.hhk
131-
DocProject/Help/*.hhp
132-
DocProject/Help/Html2
133-
DocProject/Help/html
134-
135152
# Click-Once directory
136153
publish/
137154

138155
# Publish Web Output
139156
*.[Pp]ublish.xml
140157
*.azurePubxml
141-
## TODO: Comment the next line if you want to checkin your
142-
## web deploy settings but do note that will include unencrypted
143-
## passwords
144-
#*.pubxml
145-
158+
# Note: Comment the next line if you want to checkin your web deploy settings,
159+
# but database connection strings (with potential passwords) will be unencrypted
160+
*.pubxml
146161
*.publishproj
147162

163+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
164+
# checkin your Azure Web App publish settings, but sensitive information contained
165+
# in these scripts will be unencrypted
166+
PublishScripts/
167+
148168
# NuGet Packages
149169
*.nupkg
170+
# NuGet Symbol Packages
171+
*.snupkg
150172
# The packages folder can be ignored because of Package Restore
151-
**/packages/*
173+
**/[Pp]ackages/*
152174
# except build/, which is used as an MSBuild target.
153-
!**/packages/build/
175+
!**/[Pp]ackages/build/
154176
# Uncomment if necessary however generally it will be regenerated when needed
155-
#!**/packages/repositories.config
156-
157-
# Windows Azure Build Output
158-
csx/
159-
*.build.csdef
177+
#!**/[Pp]ackages/repositories.config
178+
# NuGet v3's project.json files produces more ignorable files
179+
*.nuget.props
180+
*.nuget.targets
160181

161-
# Windows Store app package directory
182+
# Windows Store app package directories and files
162183
AppPackages/
184+
BundleArtifacts/
185+
Package.StoreAssociation.xml
186+
_pkginfo.txt
187+
*.appx
188+
*.appxbundle
189+
*.appxupload
163190

164191
# Visual Studio cache files
165192
# files ending in .cache can be ignored
166193
*.[Cc]ache
167194
# but keep track of directories ending in .cache
168-
!*.[Cc]ache/
195+
!?*.[Cc]ache/
169196

170197
# Others
171198
ClientBin/
172-
[Ss]tyle[Cc]op.*
173199
~$*
174200
*~
175201
*.dbmdl
176202
*.dbproj.schemaview
203+
*.jfm
177204
*.pfx
178205
*.publishsettings
179-
node_modules/
180206
orleans.codegen.cs
181207

182208
# RIA/Silverlight projects
@@ -189,46 +215,54 @@ _UpgradeReport_Files/
189215
Backup*/
190216
UpgradeLog*.XML
191217
UpgradeLog*.htm
192-
193-
# SQL Server files
194-
*.mdf
195-
*.ldf
196-
197-
# Business Intelligence projects
198-
*.rdl.data
199-
*.bim.layout
200-
*.bim_*.settings
218+
ServiceFabricBackup/
219+
*.rptproj.bak
201220

202221
# Microsoft Fakes
203222
FakesAssemblies/
204223

205-
# Node.js Tools for Visual Studio
206-
.ntvs_analysis.dat
224+
# CodeRush personal settings
225+
.cr/personal
207226

208-
# Visual Studio 6 build log
209-
*.plg
227+
# MSBuild Binary and Structured Log
228+
*.binlog
210229

211-
# Visual Studio 6 workspace options file
212-
*.opt
230+
# MFractors (Xamarin productivity tool) working folder
231+
.mfractor/
213232

214-
# LightSwitch generated files
215-
GeneratedArtifacts/
216-
_Pvt_Extensions/
217-
ModelManifest.xml
218-
BundleArtifacts
219-
!/build
220-
/build/tools/GitVersion.CommandLine
221-
AppPackages
233+
# Local History for Visual Studio
234+
.localhistory/
222235

223-
# NuGet V3 artifacts
224-
*-packages.config
225-
*.nuget.props
226-
*.nuget.targets
227-
project.lock.json
228-
msbuild.binlog
229-
*.project.lock.json
230-
/build/tools/**
231-
!/build/tools/packages.config
236+
# Visual Studio History (VSHistory) files
237+
.vshistory/
238+
239+
# Backup folder for Package Reference Convert tool in Visual Studio 2017
240+
MigrationBackup/
241+
242+
# VS Code files for those working on multiple tools
243+
.vscode/*
244+
!.vscode/settings.json
245+
!.vscode/tasks.json
246+
!.vscode/launch.json
247+
!.vscode/extensions.json
248+
*.code-workspace
249+
250+
# Local History for Visual Studio Code
251+
.history/
252+
253+
# Windows Installer files from build outputs
254+
*.cab
255+
*.msi
256+
*.msix
257+
*.msm
258+
*.msp
259+
260+
# JetBrains Rider
261+
*.sln.iml
262+
263+
# MSBuild response files
264+
!MSBuild.rsp
265+
!Directory.Build.rsp
232266

233267
# Generated file from .ttinclude
234268
**/Generated/TypeInfo.g.cs

Directory.Build.props

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
</When>
5454
</Choose>
5555

56+
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.UWP.Controls.props" Condition="$(IsCoreProject) and $(IsControlsProject)" />
57+
5658
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.VisualStudio.Design.props" Condition="$(IsDesignProject)" />
5759

5860
<ItemGroup>

Directory.Build.rsp

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-NoLogo
2+
-MaxCPUCount
3+
-NodeReuse:True
4+
-Verbosity:Minimal

Microsoft.Toolkit.Uwp.UI.Controls.Core.Design/Common/MetadataRegistrationBase.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.ComponentModel;
88
using System.Diagnostics;
99
using System.Diagnostics.CodeAnalysis;
10+
using System.IO;
1011
using System.Linq;
1112
using System.Reflection;
1213
using System.Xml.Linq;
@@ -101,7 +102,15 @@ private void AddDescriptions(AttributeTableBuilder builder)
101102
XDocument xDoc;
102103
try
103104
{
104-
xDoc = XDocument.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream(XmlResourceName));
105+
var basePath = Path.GetDirectoryName(typeof(MetadataRegistrationBase).Assembly.Location);
106+
string xmlDocPath = basePath;
107+
for (int i = 0; i < 2; i++)
108+
{
109+
basePath = Path.GetDirectoryName(basePath);
110+
xmlDocPath = Path.Combine(basePath, XmlResourceName);
111+
if (File.Exists(xmlDocPath)) break;
112+
}
113+
xDoc = XDocument.Load(xmlDocPath);
105114
}
106115
catch
107116
{

Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject/Microsoft.Toolkit.Win32.WpfCore.SampleApp.PackagingProject.wapproj

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
7676
</ProjectReference>
7777
</ItemGroup>
78+
<PropertyGroup Condition="'$(BaseOutputPath)' != ''">
79+
<OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
80+
<OutputPath Condition="'$(Platform)' != 'AnyCPU'">$(OutputPath)$(Platform)</OutputPath>
81+
</PropertyGroup>
7882
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
7983
<!-- No-op to avoid build error when packing solution from commandline -->
8084
<Target Name="Pack" />

UnitTests/UnitTests.XamlIslands.Package/UnitTests.XamlIslands.Package.wapproj

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
<Implicit>true</Implicit>
8484
</SDKReference>
8585
</ItemGroup>
86+
<PropertyGroup Condition="'$(BaseOutputPath)' != ''">
87+
<OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
88+
<OutputPath Condition="'$(Platform)' != 'AnyCPU'">$(OutputPath)$(Platform)</OutputPath>
89+
</PropertyGroup>
8690
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
8791
<Target Name="_StompSourceProjectForWapProject" BeforeTargets="_ConvertItems">
8892
<ItemGroup>
File renamed without changes.

0 commit comments

Comments
 (0)