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

Supports .NET 9 SDK #10

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
120 changes: 57 additions & 63 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,63 +1,57 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
# Auto detect text files and perform LF normalization
* text=false

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=text
*.csproj merge=text
*.vbproj merge=text
*.fsproj merge=text
*.dbproj merge=text

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

# ignore file

*.mp3 -diff
*.wav -diff
*.enas -diff
*.png -diff
*.jpg -diff
*.psd -diff
*.gif -diff

# binary
*.avi binary
*.bmp binary
*.exr binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary

*.a binary
*.so binary
*.dll binary
*.jar binary

*.pdf binary
*.pbxproj binary
*.vec binary
*.doc binary
*.dia binary

# CR/LF

*.bat text eol=crlf
*.sh text eol=lf
44 changes: 40 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Ignore Visual Studio temporary files, build results, and
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

# User-specific files
*.rsuser
Expand Down Expand Up @@ -29,7 +29,6 @@ x86/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/

Expand Down Expand Up @@ -91,6 +90,7 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
Expand Down Expand Up @@ -294,6 +294,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp

# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp

# Visual Studio 6 technical files
*.ncb
*.aps

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
Expand Down Expand Up @@ -350,6 +361,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/

# BeatPulse healthcheck temp database
healthchecksdb

Expand All @@ -360,4 +374,26 @@ MigrationBackup/
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
.idea/
*.sln.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net6.0-windows;net45</TargetFrameworks>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<IsPackable>false</IsPackable>
Expand All @@ -16,7 +16,7 @@
</PropertyGroup>

<PropertyGroup>
<DCAppHostPatcherToolPath>$(MSBuildProjectDirectory)\..\..\src\dotnetCampus.AppHost\bin\$(Configuration)\net6.0\dotnetCampus.AppHost.dll</DCAppHostPatcherToolPath>
<DCAppHostPatcherToolPath>$(MSBuildProjectDirectory)\..\..\src\dotnetCampus.AppHost\bin\$(Configuration)\net8.0\dotnetCampus.AppHost.dll</DCAppHostPatcherToolPath>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions src/dotnetCampus.AppHost/Assets/build/Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
<!-- 暂时还没有支持 net5.0。 -->
<!--<_DCTargetFramework Condition="'$(TargetFramework)'=='net5.0'">net5.0</_DCTargetFramework>-->
<!--<_DCTargetFramework Condition="'$(TargetFramework)'=='net5.0-windows'">net5.0</_DCTargetFramework>-->
<CreateCustomAppHostDependsOn>_ChooseAppHost</CreateCustomAppHostDependsOn>
<CreateCustomAppHostDependsOn Condition="$([MSBuild]::VersionGreaterThanOrEquals($(NETCoreSdkVersion), 9.0))">_GetAppHostPaths</CreateCustomAppHostDependsOn>
</PropertyGroup>

<Target Name="CreateCustomAppHost" BeforeTargets="_CreateAppHost" DependsOnTargets="_ChooseAppHost">
<Target Name="CreateCustomAppHost" BeforeTargets="_CreateAppHost" DependsOnTargets="$(CreateCustomAppHostDependsOn)">

<PropertyGroup>
<_DCAppHostRoot>$(MSBuildThisFileDirectory)..\</_DCAppHostRoot>
Expand Down Expand Up @@ -90,4 +92,4 @@ AppHostNeedSystemPrereqsUrl = $(AppHostNeedSystemPrereqsUrl) &lt;系统

</Target>

</Project>
</Project>
2 changes: 1 addition & 1 deletion src/dotnetCampus.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !NET6_0
#if !NET8_0
internal static class Program
{
private static void Main()
Expand Down
10 changes: 7 additions & 3 deletions src/dotnetCampus.AppHost/dotnetCampus.AppHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net6.0;net5.0;netstandard2.0;net45</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.0;net45</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>dotnetCampus.AppHosting</RootNamespace>
Expand Down Expand Up @@ -30,13 +30,17 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="dotnetCampus.CommandLine.Source" Version="3.3.0" PrivateAssets="All" />
<PackageReference Include="dotnetCampus.Configurations.Source" Version="1.6.8" PrivateAssets="All" />
<PackageReference Include="dotnetCampus.MSBuildUtils.Source" Version="1.1.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
<Compile Remove="**\*.cs" />
<Compile Include="Program.cs" />
</ItemGroup>
Expand Down
Loading