Skip to content
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
2 changes: 1 addition & 1 deletion src/ConfigReader.Tests/ConfigReader.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);xUnit1051</NoWarn>
<RootNamespace>testing</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigReader/ConfigReader.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net48;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net48;net8.0;net9.0</TargetFrameworks>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/ConfigReader/LogBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ public static string BuildConfigLogMessage(string targetDirectory, ConfigResult
""");
}

#if NET48
builder.AppendLine(" TargetFramework: net48");
#endif
#if NET9_0
builder.AppendLine(" TargetFramework: net9.0");
#endif
return builder.ToString().Trim();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;NU1608;NU1109</NoWarn>
<Version>28.0.0-beta.3</Version>
<Version>28.0.0-beta.4</Version>
<LangVersion>preview</LangVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Markdown, Snippets, mdsnippets, documentation, MarkdownSnippets</PackageTags>
Expand Down
20 changes: 13 additions & 7 deletions src/MarkdownSnippets.MsBuild/MarkdownSnippets.MsBuild.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net48;net9.0</TargetFrameworks>
<Description>Extract code snippets from any language to be used when building documentation.</Description>
<DevelopmentDependency>true</DevelopmentDependency>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>
<Target Name="ShowSdkInfo" BeforeTargets="Build">
<Message Text="SDK Version: $(NETCoreSdkVersion)" Importance="high" />
<Message Text="SDK Major: $(SdkMajorVersion)" Importance="high" />
<Message Text="Target Framework: $(TargetFramework)" Importance="high" />
<Message Text="SDK Root: $(NetCoreSdkBundledVersionsPropsPath)" Importance="high" />
</Target>
<ItemGroup>
<Compile Include="..\ConfigReader\*.cs" />

<Content Include=".\bin\$(Configuration)\$(TargetFramework)\MarkdownSnippets.MsBuild.dll">
<TfmSpecificPackageFile Include=".\bin\$(Configuration)\$(TargetFramework)\MarkdownSnippets.MsBuild.dll">
<Pack>true</Pack>
<PackagePath>task</PackagePath>
</Content>
<Content Include="$(SolutionDir)MarkdownSnippets\bin\$(Configuration)\$(TargetFramework)\MarkdownSnippets.dll">
<PackagePath>task\$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(SolutionDir)MarkdownSnippets\bin\$(Configuration)\$(TargetFramework)\MarkdownSnippets.dll">
<Pack>true</Pack>
<PackagePath>task</PackagePath>
</Content>
<PackagePath>task\$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
<Content Include="MarkdownSnippets.MsBuild.targets">
<Pack>true</Pack>
<PackagePath>build</PackagePath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MarkdownSnippetsAssembly>$(MSBuildThisFileDirectory)..\task\MarkdownSnippets.MsBuild.dll</MarkdownSnippetsAssembly>
<MarkdownSnippetsAssembly Condition="$(MSBuildRuntimeType) == 'Core'">$(MSBuildThisFileDirectory)..\task\net9.0</MarkdownSnippetsAssembly>
<MarkdownSnippetsAssembly Condition="$(MSBuildRuntimeType) != 'Core'">$(MSBuildThisFileDirectory)..\task\net48</MarkdownSnippetsAssembly>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
Dir6
UrlsAsSnippets:
Url1
Url2
Url2
TargetFramework: net9.0
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
FileConfigPath: theConfigFilePath (exists:False)
ReadOnly:
WriteHeader:
Header:
Header:
TargetFramework: net9.0
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
Dir6
UrlsAsSnippets:
Url1
Url2
Url2
TargetFramework: net9.0
9 changes: 6 additions & 3 deletions src/MarkdownSnippets.Tool.Tests/LogBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public Task BuildConfigLogMessage()
Convention = DocumentConvention.InPlaceOverwrite,
};
var message = LogBuilder.BuildConfigLogMessage("theRoot", config, "theConfigFilePath");
return Verify(message);
return Verify(message)
.UniqueForTargetFrameworkAndVersion();
}

[Fact]
Expand All @@ -45,14 +46,16 @@ public Task BuildConfigLogMessageSourceTransform()
Convention = DocumentConvention.SourceTransform,
};
var message = LogBuilder.BuildConfigLogMessage("theRoot", config, "theConfigFilePath");
return Verify(message);
return Verify(message)
.UniqueForTargetFrameworkAndVersion();
}

[Fact]
public Task BuildConfigLogMessageMinimal()
{
var config = new ConfigResult();
var message = LogBuilder.BuildConfigLogMessage("theRoot", config, "theConfigFilePath");
return Verify(message);
return Verify(message)
.UniqueForTargetFrameworkAndVersion();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);xUnit1051</NoWarn>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/MarkdownSnippets.Tool/MarkdownSnippets.Tool.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ToolCommandName>mdsnippets</ToolCommandName>
<AssemblyName>mdsnippets</AssemblyName>
<PackageId>MarkdownSnippets.Tool</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/MarkdownSnippets/MarkdownSnippets.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net48;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net48;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ProjectDefaults" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net48</TargetFrameworks>
<TargetFrameworks>net8.0;$(TargetFrameworks)</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;$(TargetFrameworks)</TargetFrameworks>
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);xUnit1051</NoWarn>
<RootNamespace>testing</RootNamespace>
Expand Down
1 change: 1 addition & 0 deletions src/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ build_script:
Invoke-WebRequest "https://dot.net/v1/dotnet-install.sh" -OutFile "./dotnet-install.sh"
sudo chmod u+x dotnet-install.sh
sudo ./dotnet-install.sh --jsonfile src/global.json --architecture x64 --install-dir '/usr/local/share/dotnet'
sudo ./dotnet-install.sh --version 9.0.305 --architecture x64 --install-dir '/usr/local/share/dotnet'
}
- dotnet build src --configuration Release
- dotnet test src --configuration Release --no-build --no-restore
Expand Down