Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to get msbuild tests working #1016

Merged
merged 2 commits into from
Nov 16, 2023
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
7 changes: 5 additions & 2 deletions .github/workflows/validate_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
- run: |
rm -r -f ./Tests/CSharpier.MsBuild.Test
dotnet tool restore
dotnet csharpier . --check
build_msbuild:
test_msbuild:
runs-on: ubuntu-latest
name: Build CSharpier.MSBuild
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
- run: |
dotnet build Src/CSharpier.MsBuild/CSharpier.MsBuild.csproj
dotnet pack Src/CSharpier.MsBuild/CSharpier.MsBuild.csproj -o nupkg /p:Version=0.0.1
docker build -f ./Tests/CSharpier.MsBuild.Test/Dockerfile .

16 changes: 0 additions & 16 deletions Src/CSharpier.MsBuild.Test/CSharpier.MsBuild.Test.sln

This file was deleted.

8 changes: 0 additions & 8 deletions Src/CSharpier.MsBuild.Test/Dockerfile

This file was deleted.

13 changes: 13 additions & 0 deletions Tests/CSharpier.MsBuild.Test/.idea/.idea.Test/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Tests/CSharpier.MsBuild.Test/.idea/.idea.Test/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Tests/CSharpier.MsBuild.Test/.idea/.idea.Test/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Tests/CSharpier.MsBuild.Test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<Project>
</Project>
6 changes: 6 additions & 0 deletions Tests/CSharpier.MsBuild.Test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS base

COPY ./nupkg ./nupkg
COPY ./Tests/CSharpier.MsBuild.Test ./Tests/CSharpier.MsBuild.Test

RUN dotnet build Tests/CSharpier.MsBuild.Test -c Release
27 changes: 27 additions & 0 deletions Tests/CSharpier.MsBuild.Test/Test.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net8.0", "net8.0\net8.0.csproj", "{8D0B3F99-1F30-48D9-BCA2-082FBD34E718}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net7.0", "net7.0\net7.0.csproj", "{86D709CC-6B25-4574-8376-B5EC1AA35FA4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net48", "net48\net48.csproj", "{C0423F42-4ABD-4BBB-9458-15D7AED8AD94}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8D0B3F99-1F30-48D9-BCA2-082FBD34E718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D0B3F99-1F30-48D9-BCA2-082FBD34E718}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D0B3F99-1F30-48D9-BCA2-082FBD34E718}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D0B3F99-1F30-48D9-BCA2-082FBD34E718}.Release|Any CPU.Build.0 = Release|Any CPU
{86D709CC-6B25-4574-8376-B5EC1AA35FA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86D709CC-6B25-4574-8376-B5EC1AA35FA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86D709CC-6B25-4574-8376-B5EC1AA35FA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86D709CC-6B25-4574-8376-B5EC1AA35FA4}.Release|Any CPU.Build.0 = Release|Any CPU
{C0423F42-4ABD-4BBB-9458-15D7AED8AD94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0423F42-4ABD-4BBB-9458-15D7AED8AD94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0423F42-4ABD-4BBB-9458-15D7AED8AD94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0423F42-4ABD-4BBB-9458-15D7AED8AD94}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
16 changes: 16 additions & 0 deletions Tests/CSharpier.MsBuild.Test/net48/net48.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<OutputType>library</OutputType>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions Tests/CSharpier.MsBuild.Test/net7.0/Class.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public class Class { }
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<OutputType>library</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.0">
<PackageReference Include="CSharpier.MsBuild" Version="0.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
1 change: 1 addition & 0 deletions Tests/CSharpier.MsBuild.Test/net8.0/Class.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public class Class { }
16 changes: 16 additions & 0 deletions Tests/CSharpier.MsBuild.Test/net8.0/net8.0.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<OutputType>library</OutputType>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="Test Source" value="../../nupkg" />
<add key="Local" value="../../nupkg" />
</packageSources>
</configuration>
3 changes: 3 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"sdk": {
"version": "8.0.100",
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Microsoft.Build.Traversal": "4.1.0"
}
}
Loading