-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dominik Graf
committed
Jul 25, 2024
1 parent
cc7ccb8
commit 6e61b37
Showing
4 changed files
with
67 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters