Skip to content

Commit

Permalink
Update app.sln and app.csproj
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Graf committed Jul 25, 2024
1 parent cc7ccb8 commit 6e61b37
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 52 deletions.
4 changes: 2 additions & 2 deletions App_Data/app.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SexyContent FileVersion="07.00.00" MinimumRequiredVersion="07.04.02" ModuleVersion="17.07.00" ExportDate="2024-05-02T11:00:22.5402093+02:00">
<SexyContent FileVersion="07.00.00" MinimumRequiredVersion="07.04.02" ModuleVersion="18.00.00" ExportDate="2024-07-25T10:14:29.0307024+02:00">
<Header>
<App Guid="8a4ae8c7-331b-455d-8d77-7ed38948c506" />
<Language Default="en-us" />
Expand Down Expand Up @@ -405,7 +405,7 @@
<Value Key="SupportsAjaxReload" Value="True" Type="Boolean">
<Dimension DimensionID="161" ReadOnly="false" />
</Value>
<Value Key="Version" Value="03.17.00" Type="String">
<Value Key="Version" Value="03.17.01" Type="String">
<Dimension DimensionID="161" ReadOnly="false" />
</Value>
</Entity>
Expand Down
97 changes: 49 additions & 48 deletions app.csproj
Original file line number Diff line number Diff line change
@@ -1,73 +1,74 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<!-- This file helps VS Code provide IntelliSense - see https://go.2sxc.org/vscode -->
<!-- Template v2024-06-19. If you have issues, try getting a newer copy from the url above -->

<!-- Specify the default Namespace for C# code in this specific App -->
<PropertyGroup>
<!-- Specify the .net Framework you are targeting - this is usually net4.7.2 or net4.8
https://learn.microsoft.com/en-us/dotnet/standard/frameworks
- eg "net472", "net48", "net8.0" etc.
- net472 is the default for DNN 9.8 and earlier but usually net48 works
- net8.0 is the default for Oqtane 5
-->
<TargetFramework>net472</TargetFramework>
<RootNamespace>AppCode</RootNamespace>
</PropertyGroup>

<!-- Specify the default Namespace for code in this specific App -->
<RootNamespace>ThisApp</RootNamespace>
<!-- First: Detect if it's running in Dnn, Oqtane-Production or Oqtane-Dev -->
<PropertyGroup>
<RunningInDnn Condition="Exists('..\..\..\..\bin\DotNetNuke.dll')">true</RunningInDnn>
<RunningInOqtane Condition="Exists('..\..\..\Oqtane.Server.dll') Or Exists('..\..\..\bin\Debug\net8.0\Oqtane.Server.dll')">true</RunningInOqtane>
<OqtaneIsProd Condition="Exists('..\..\..\Oqtane.Server.dll')">true</OqtaneIsProd>
<OqtaneIsDev Condition="Exists('..\..\..\bin\Debug\net8.0\Oqtane.Server.dll')">true</OqtaneIsDev>
</PropertyGroup>

<!-- Specify what C# version to use
https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history
- eg. "7.3", "8.0" or "12.0" (Oqtane 5+)
-->
<!-- Settings for Dnn -->
<PropertyGroup Condition="'$(RunningInDnn)' == 'true'">
<!-- Specify .net 4.7.2, C# 8.0 and Bin folder for DNN - see https://go.2sxc.org/vscode -->
<TargetFramework>net472</TargetFramework>
<LangVersion>8.0</LangVersion>

<!-- Variable to path where the DLLs are in Dnn
- This allows you to easily adjust the path if you have a different location
- For clarity / consistency, we recommend to not end with a slash
- Below you will use it using $(PathBin)
-->
<!-- PathBin for Dnn -->
<PathBin>..\..\..\..\bin</PathBin>
<!-- PathBin Oqtane production, just up 3 folders, no bin-subfolder -->
<!-- <PathBin>..\..\..</PathBin> -->
<!-- PathBin Oqtane dev/debug, up 3 folders and current build folder -->
<!-- <PathBin>..\..\..\bin\Debug\net8.0</PathBin> -->
</PropertyGroup>

<!-- Settings for Oqtane -->
<PropertyGroup Condition="'$(RunningInOqtane)' == 'true'">
<!-- Oqtane 5+ uses .net 8 and a very new C# language version -->
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>

<!-- PathBin Oqtane production, the bin folder is in the root, just up 3 folders, no bin-subfolder -->
<PathBin Condition="'$(OqtaneIsProd)' == 'true'">..\..\..</PathBin>

<!-- PathBin Oqtane dev/debug, the bin folder is deeper down, up 3 folders and current build folder -->
<PathBin Condition="'$(OqtaneIsDev)' == 'true'">..\..\..\bin\Debug\net8.0</PathBin>
</PropertyGroup>


<!-- IntelliSense: Load all DLLs which exist in Dnn and Oqtane from the bin folder -->
<ItemGroup>
<!-- Tell Visual Studio & VSCode to respect all ToSic.* DLLs in the root bin folder -->
<Reference Include="$(PathBin)\ToSic.*.dll" />
<Reference Include="$(PathBin)\Connect.Koi.dll" />

<!-- Common Microsoft DLLs -->
<Reference Include="$(PathBin)\System.Text.Json.dll" />

<!-- Also load files in the Dependencies folder of the current App -->
<Reference Include="Dependencies\*.dll" />
</ItemGroup>

<!-- IntelliSense: DNN specific -->
<ItemGroup Condition="'$(RunningInDnn)' == 'true'">
<!-- also add System.Web and DotNetNuke DLLs - useful when creating APIs, but be aware that it may make your code less hybrid -->
<Reference Include="$(PathBin)\DotNetNuke.dll" />
<Reference Include="$(PathBin)\DotNetNuke.*.dll" />
<Reference Include="$(PathBin)\System.Web.Http.dll" />
<Reference Include="$(PathBin)\System.Web.WebPages.dll" />
<Reference Include="$(PathBin)\System.Net.Http.dll" />

<!-- added here -->
<Reference Include="$(PathBin)\Connect.Koi.dll" />

<!-- System.Web is not in the DNN folder but in the .net Framework installed on the server -->
<Reference Include="System.Web" />
<Reference Include="System.Net.Http" />
</ItemGroup>

<!-- Polymorphism
If you're working with Polymorphism then you have many of the same files, which confuses Intellisense eg.
- /live and /staging have the same files
- /bs3 /bs4 / bs5 have the same files
The following is meant to exclude some of these folders from intellisense
-->
<!-- Exclude /bs3 as we're always working on /bs5 -->
<!-- <ItemGroup>
<None Remove="bs3\**" />
<Content Remove="bs3\**" />
<Compile Remove="bs3\**" />
<EmbeddedResource Remove="bs3\**" />
</ItemGroup> -->
<!-- Exclude /bs4 as we're always working on /bs5 -->
<!-- Polymorphism - if have files with the same classes confuse IntelliSense - see https://go.2sxc.org/vscode -->
<!-- Example: exclude /live as we're always working on /staging -->
<!-- <ItemGroup>
<None Remove="bs4\**" />
<Content Remove="bs4\**" />
<Compile Remove="bs4\**" />
<EmbeddedResource Remove="bs4\**" />
<None Remove="live\**" />
<Content Remove="live\**" />
<Compile Remove="live\**" />
<EmbeddedResource Remove="live\**" />
</ItemGroup> -->
</Project>

</Project>
15 changes: 14 additions & 1 deletion app.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,18 @@ EndProject
# This is necessary so that VS Code can perform intellisense in Razor
# It also requires a csproj file to exist as well
#
# Read more on https://go.2sxc.org/vscode
# Read more and get help for issues on https://go.2sxc.org/vscode
#

# Addition 2024-05
# The following section is suddenly required by the C# DevKit
# See https://github.com/microsoft/vscode-dotnettools/issues/1151
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ But note that you usually don't want to do this, as added snippets should just b
* v03.17.00 2023-07
* strong Typed
* Auto Generated Class

* v03.17.01 2024-0
* Update app.sln and app.csproj

0 comments on commit 6e61b37

Please sign in to comment.