diff options
| author | Bob Arnson <bob@firegiant.com> | 2025-02-14 22:29:39 -0500 |
|---|---|---|
| committer | Bob Arnson <github@bobs.org> | 2025-03-03 14:25:07 -0500 |
| commit | ca6e44d496b0c589fdaabad69a00643f539c47cd (patch) | |
| tree | edf84727cecfc03092a2851b465d97622c5048eb /src/ext/VisualStudio | |
| parent | ba7fd5837ea149b2e319cc577fad27ce1162a064 (diff) | |
| download | wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.gz wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.bz2 wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.zip | |
Convert ext\ to MSTest and traversal projects.
- Move ext\ unit tests to MSTest.
- MSBuildify ext projects with MSTest execution.
- Fork test support projects for MSTest:
- WixInternal.TestSupport
- WixInternal.Core.TestPackage
Diffstat (limited to 'src/ext/VisualStudio')
4 files changed, 27 insertions, 29 deletions
diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs index f3e81e2d..992ac953 100644 --- a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs | |||
| @@ -2,15 +2,16 @@ | |||
| 2 | 2 | ||
| 3 | namespace WixToolsetTest.VisualStudio | 3 | namespace WixToolsetTest.VisualStudio |
| 4 | { | 4 | { |
| 5 | using WixInternal.TestSupport; | 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; |
| 6 | using WixInternal.Core.TestPackage; | 6 | using WixInternal.MSTestSupport; |
| 7 | using WixInternal.Core.MSTestPackage; | ||
| 7 | using WixToolset.VisualStudio; | 8 | using WixToolset.VisualStudio; |
| 8 | using Xunit; | ||
| 9 | using System.Linq; | 9 | using System.Linq; |
| 10 | 10 | ||
| 11 | [TestClass] | ||
| 11 | public class VisualStudioExtensionFixture | 12 | public class VisualStudioExtensionFixture |
| 12 | { | 13 | { |
| 13 | [Fact] | 14 | [TestMethod] |
| 14 | public void CanBuildUsingVsixPackage() | 15 | public void CanBuildUsingVsixPackage() |
| 15 | { | 16 | { |
| 16 | var folder = TestData.Get(@"TestData\UsingVsixPackage"); | 17 | var folder = TestData.Get(@"TestData\UsingVsixPackage"); |
| @@ -36,7 +37,7 @@ namespace WixToolsetTest.VisualStudio | |||
| 36 | }, results); | 37 | }, results); |
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | [Fact] | 40 | [TestMethod] |
| 40 | public void CanBuildUsingVsixPackageOnArm64() | 41 | public void CanBuildUsingVsixPackageOnArm64() |
| 41 | { | 42 | { |
| 42 | var folder = TestData.Get(@"TestData\UsingVsixPackage"); | 43 | var folder = TestData.Get(@"TestData\UsingVsixPackage"); |
diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj index 2b0a7c1c..9cfb6867 100644 --- a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 3 | 3 | ||
| 4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="MSTest.Sdk"> |
| 5 | <PropertyGroup> | 5 | <PropertyGroup> |
| 6 | <TargetFramework>net6.0</TargetFramework> | 6 | <TargetFramework>net6.0</TargetFramework> |
| 7 | <IsWixTestProject>true</IsWixTestProject> | 7 | <IsWixMSTestProject>true</IsWixMSTestProject> |
| 8 | </PropertyGroup> | 8 | </PropertyGroup> |
| 9 | 9 | ||
| 10 | <ItemGroup> | 10 | <ItemGroup> |
| @@ -16,6 +16,7 @@ | |||
| 16 | </ItemGroup> | 16 | </ItemGroup> |
| 17 | 17 | ||
| 18 | <ItemGroup> | 18 | <ItemGroup> |
| 19 | <PackageReference Include="WixInternal.Core.TestPackage" /> | 19 | <PackageReference Include="WixInternal.MSTestSupport" /> |
| 20 | <PackageReference Include="WixInternal.Core.MSTestPackage" /> | ||
| 20 | </ItemGroup> | 21 | </ItemGroup> |
| 21 | </Project> | 22 | </Project> |
diff --git a/src/ext/VisualStudio/visualstudio_t.proj b/src/ext/VisualStudio/visualstudio_t.proj new file mode 100644 index 00000000..52de8019 --- /dev/null +++ b/src/ext/VisualStudio/visualstudio_t.proj | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | <Project Sdk="Microsoft.Build.Traversal"> | ||
| 5 | <ItemGroup> | ||
| 6 | <ProjectReference Include="test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj" /> | ||
| 7 | <ProjectReference Include="wixext\WixToolset.VisualStudio.wixext.csproj" Targets="Pack" Properties="NoBuild=true" /> | ||
| 8 | </ItemGroup> | ||
| 9 | |||
| 10 | <Target Name="WixClean" BeforeTargets="Restore" Condition="'$(SuppressWixClean)' != 'true'"> | ||
| 11 | <RemoveDir Directories="$(RootBuildFolder)VisualStudio.wixext" /> | ||
| 12 | <RemoveDir Directories="$(USERPROFILE)\.nuget\packages\wixtoolset.VisualStudio.wixext" Condition="'$(NUGET_PACKAGES)' == ''" /> | ||
| 13 | <RemoveDir Directories="$(NUGET_PACKAGES)\wixtoolset.VisualStudio.wixext" Condition="'$(NUGET_PACKAGES)' != ''" /> | ||
| 14 | |||
| 15 | <Delete Files="$(ArtifactsFolder)WixToolset.VisualStudio.wixext.*.nupkg" /> | ||
| 16 | </Target> | ||
| 17 | </Project> | ||
diff --git a/src/ext/VisualStudio/vs.cmd b/src/ext/VisualStudio/vs.cmd deleted file mode 100644 index f0873f1d..00000000 --- a/src/ext/VisualStudio/vs.cmd +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | @setlocal | ||
| 2 | @pushd %~dp0 | ||
| 3 | |||
| 4 | @set _C=Debug | ||
| 5 | :parse_args | ||
| 6 | @if /i "%1"=="release" set _C=Release | ||
| 7 | @if not "%1"=="" shift & goto parse_args | ||
| 8 | |||
| 9 | @echo VisualStudio.wixext build %_C% | ||
| 10 | |||
| 11 | :: Build | ||
| 12 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -warnaserror || exit /b | ||
| 13 | |||
| 14 | :: Test | ||
| 15 | dotnet test -c %_C% --no-build test\WixToolsetTest.VisualStudio || exit /b | ||
| 16 | |||
| 17 | :: Pack | ||
| 18 | msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true wixext\WixToolset.VisualStudio.wixext.csproj || exit /b | ||
| 19 | |||
| 20 | @popd | ||
| 21 | @endlocal | ||
