|
| 1 | +<Project Sdk="Microsoft.NET.Sdk.Web"> |
| 2 | + <!-- This file helps VS Code provide IntelliSense - see https://go.2sxc.org/vscode --> |
| 3 | + <!-- Template v2024-06-19. If you have issues, try getting a newer copy from the url above --> |
| 4 | + |
| 5 | + <!-- Specify the default Namespace for C# code in this specific App --> |
| 6 | + <PropertyGroup> |
| 7 | + <RootNamespace>AppCode</RootNamespace> |
| 8 | + </PropertyGroup> |
| 9 | + |
| 10 | + <!-- First: Detect if it's running in Dnn, Oqtane-Production or Oqtane-Dev --> |
| 11 | + <PropertyGroup> |
| 12 | + <RunningInDnn Condition="Exists('..\..\..\..\bin\DotNetNuke.dll')">true</RunningInDnn> |
| 13 | + <RunningInOqtane Condition="Exists('..\..\..\Oqtane.Server.dll') Or Exists('..\..\..\bin\Debug\net8.0\Oqtane.Server.dll')">true</RunningInOqtane> |
| 14 | + <OqtaneIsProd Condition="Exists('..\..\..\Oqtane.Server.dll')">true</OqtaneIsProd> |
| 15 | + <OqtaneIsDev Condition="Exists('..\..\..\bin\Debug\net8.0\Oqtane.Server.dll')">true</OqtaneIsDev> |
| 16 | + </PropertyGroup> |
| 17 | + |
| 18 | + <!-- Settings for Dnn --> |
| 19 | + <PropertyGroup Condition="'$(RunningInDnn)' == 'true'"> |
| 20 | + <!-- Specify .net 4.7.2, C# 8.0 and Bin folder for DNN - see https://go.2sxc.org/vscode --> |
| 21 | + <TargetFramework>net472</TargetFramework> |
| 22 | + <LangVersion>8.0</LangVersion> |
| 23 | + <PathBin>..\..\..\..\bin</PathBin> |
| 24 | + </PropertyGroup> |
| 25 | + |
| 26 | + <!-- Settings for Oqtane --> |
| 27 | + <PropertyGroup Condition="'$(RunningInOqtane)' == 'true'"> |
| 28 | + <!-- Oqtane 5+ uses .net 8 and a very new C# language version --> |
| 29 | + <TargetFramework>net8.0</TargetFramework> |
| 30 | + <LangVersion>latest</LangVersion> |
| 31 | + |
| 32 | + <!-- PathBin Oqtane production, the bin folder is in the root, just up 3 folders, no bin-subfolder --> |
| 33 | + <PathBin Condition="'$(OqtaneIsProd)' == 'true'">..\..\..</PathBin> |
| 34 | + |
| 35 | + <!-- PathBin Oqtane dev/debug, the bin folder is deeper down, up 3 folders and current build folder --> |
| 36 | + <PathBin Condition="'$(OqtaneIsDev)' == 'true'">..\..\..\bin\Debug\net8.0</PathBin> |
| 37 | + </PropertyGroup> |
| 38 | + |
| 39 | + |
| 40 | + <!-- IntelliSense: Load all DLLs which exist in Dnn and Oqtane from the bin folder --> |
| 41 | + <ItemGroup> |
| 42 | + <Reference Include="$(PathBin)\ToSic.*.dll" /> |
| 43 | + <Reference Include="$(PathBin)\Connect.Koi.dll" /> |
| 44 | + |
| 45 | + <!-- Common Microsoft DLLs --> |
| 46 | + <Reference Include="$(PathBin)\System.Text.Json.dll" /> |
| 47 | + |
| 48 | + <!-- Also load files in the Dependencies folder of the current App --> |
| 49 | + <Reference Include="Dependencies\*.dll" /> |
| 50 | + </ItemGroup> |
| 51 | + |
| 52 | + <!-- IntelliSense: DNN specific --> |
| 53 | + <ItemGroup Condition="'$(RunningInDnn)' == 'true'"> |
| 54 | + <!-- also add System.Web and DotNetNuke DLLs - useful when creating APIs, but be aware that it may make your code less hybrid --> |
| 55 | + <Reference Include="$(PathBin)\DotNetNuke.dll" /> |
| 56 | + <Reference Include="$(PathBin)\DotNetNuke.*.dll" /> |
| 57 | + <Reference Include="$(PathBin)\System.Web.Http.dll" /> |
| 58 | + <Reference Include="$(PathBin)\System.Web.WebPages.dll" /> |
| 59 | + |
| 60 | + <!-- System.Web is not in the DNN folder but in the .net Framework installed on the server --> |
| 61 | + <Reference Include="System.Web" /> |
| 62 | + <Reference Include="System.Net.Http" /> |
| 63 | + </ItemGroup> |
| 64 | + |
| 65 | + <!-- Polymorphism - if have files with the same classes confuse IntelliSense - see https://go.2sxc.org/vscode --> |
| 66 | + <!-- Example: exclude /live as we're always working on /staging --> |
| 67 | + <!-- <ItemGroup> |
| 68 | + <None Remove="live\**" /> |
| 69 | + <Content Remove="live\**" /> |
| 70 | + <Compile Remove="live\**" /> |
| 71 | + <EmbeddedResource Remove="live\**" /> |
| 72 | + </ItemGroup> --> |
| 73 | + |
| 74 | +</Project> |
0 commit comments