-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
39 lines (29 loc) · 1.4 KB
/
Copy pathDirectory.Build.props
File metadata and controls
39 lines (29 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<Project>
<!-- Centralne zarządzanie pakietami NuGet -->
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<!-- Wspólne właściwości dla wszystkich projektów -->
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<!-- Automatyczne namespace'y na podstawie struktury folderów -->
<PropertyGroup>
<!-- Bazowy namespace -->
<RootNamespaceBase>Translarr</RootNamespaceBase>
<!-- Wyznacz relatywną ścieżkę projektu względem pliku sln -->
<_RelativePath>$([System.IO.Path]::GetRelativePath('$(MSBuildThisFileDirectory)', '$(MSBuildProjectDirectory)'))</_RelativePath>
<!-- Zamień / i \ na . -->
<_RelativePath>$([System.String]::Copy($(_RelativePath)).Replace('\', '.').Replace('/', '.'))</_RelativePath>
<!-- Usuń ewentualne kropki na końcu -->
<_RelativePath>$([System.Text.RegularExpressions.Regex]::Replace($(_RelativePath), "\.$", ""))</_RelativePath>
<!-- Zbuduj finalny RootNamespace -->
<RootNamespace>$(RootNamespaceBase).$(_RelativePath)</RootNamespace>
<!-- To samo dla nazwy assembly (opcjonalnie) -->
<AssemblyName>$(RootNamespace)</AssemblyName>
</PropertyGroup>
</Project>