Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Add net6.0 target framework, bump editor #3

Merged
merged 4 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
dotnet-version: '6.0.x'

- name: Set up NuGet
uses: nuget/setup-nuget@v1
Expand All @@ -30,13 +30,13 @@ jobs:
- name: Build
run: dotnet build MonoDevelop.Xml.sln -c ${{ matrix.config }} --no-restore

- name: Test (Windows)
if: startsWith (matrix.os, 'windows')
run: dotnet test -c ${{ matrix.config }} --no-build
# - name: Test (Windows)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests won't work unless minieditor gets updated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don’t care at this point

# if: startsWith (matrix.os, 'windows')
# run: dotnet test -c ${{ matrix.config }} --no-build

- name: Test (Linux/Mac)
if: startsWith (matrix.os, 'windows') == false
# dotnet test doesn't support mono so we have to use the nunit runner
run: |
nuget install NUnit.ConsoleRunner -Version 3.11.1 -OutputDirectory testrunner
mono ./testrunner/NUnit.ConsoleRunner.3.11.1/tools/nunit3-console.exe ./Tests/bin/${{ matrix.config }}/MonoDevelop.Xml.Tests.dll
# - name: Test (Linux/Mac)
# if: startsWith (matrix.os, 'windows') == false
# # dotnet test doesn't support mono so we have to use the nunit runner
# run: |
# nuget install NUnit.ConsoleRunner -Version 3.11.1 -OutputDirectory testrunner
# mono ./testrunner/NUnit.ConsoleRunner.3.11.1/tools/nunit3-console.exe ./Tests/bin/${{ matrix.config }}/MonoDevelop.Xml.Tests.dll
19 changes: 14 additions & 5 deletions Editor/MonoDevelop.Xml.Editor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFrameworks>net6.0;net472</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand All @@ -19,14 +19,23 @@

<ItemGroup>
<ProjectReference Include="..\Core\MonoDevelop.Xml.Core.csproj" />
<PackageReference Include="Microsoft.VisualStudio.ImageCatalog" Version="16.9.31023.347" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.Intellisense" Version="16.9.227" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.StandardClassification" Version="16.9.227" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="16.10.56" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.ImageCatalog" Version="17.1.32107.28" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language" Version="17.1.387" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.Intellisense" Version="17.1.387" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Language.StandardClassification" Version="17.1.387" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.1.46" ExcludeAssets="runtime" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.ComponentModel.Composition" />
</ItemGroup>

<!-- Turn off windows dependency check. Some packages still have windows-specific dependencies, even though in the cases that matter they are not used at run-time -->
<Target Name="IgnoreWindowsReferenceError" BeforeTargets="_CheckForTransitiveWindowsDesktopDependencies">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This target should only be necessary when a net6.0* project references net472 nupkgs. In this project, every package should resolve as netstandard2.0 for the net6.0 target framework, but for some reason NuGet is resolving them as net472, triggering this error and also NuGet/Home#5957.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should note that this happens even if I remove the net472 from TargetFrameworks completely.

<ItemGroup>
<TransitiveFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
<TransitiveFrameworkReference Remove="Microsoft.WindowsDesktop.App.WPF" />
</ItemGroup>
</Target>

</Project>
2 changes: 2 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
<add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
</packageSources>
</configuration>