Skip to content

Commit

Permalink
Update to use msbuild instead of dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhath6 committed Dec 22, 2024
1 parent 390d401 commit 19c9e36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: "Build"
permissions:
actions: write
Expand Down Expand Up @@ -37,15 +34,15 @@ jobs:
- name: Restore
run: dotnet restore NoVarExtension.sln

- name: Test
run: dotnet test NoVarExtension.sln --no-build --verbosity normal

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3
uses: microsoft/setup-msbuild@v2

- name: Build
run: msbuild NoVarExtension.sln /property:Configuration=Release /t:Rebuild

- name: Run UnitTests
run: dotnet test NoVarTest/NoVarTests.csproj -c Release --no-build

- name: Move build output
run: mv bin/Release/NoVar.vsix NoVar-${{ env.VERSION }}.vsix
working-directory: NoVar
Expand Down
14 changes: 9 additions & 5 deletions NoVarTest/NoVarTests.csproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<OutputType>Library</OutputType>
Expand All @@ -16,15 +15,18 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.VisualStudio.Text.UI.Wpf" Version="17.0.487" />
<PackageReference Include="Moq" Version="4.18.0" />
<PackageReference Include="NUnit" Version="4.3.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.4.0">
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit.Analyzers" Version="3.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild">
<Version>4.12.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand All @@ -35,4 +37,6 @@
<ProjectReference Include="..\NoVar\NoVar.csproj" />
</ItemGroup>

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\VSSDK\Microsoft.VsSDK.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\VSSDK\Microsoft.VsSDK.targets')" />

</Project>

0 comments on commit 19c9e36

Please sign in to comment.