Skip to content

Commit 0583506

Browse files
committed
nuget packages dependencies fix, custom solution file
1 parent 5a7cbe8 commit 0583506

File tree

6 files changed

+255
-25
lines changed

6 files changed

+255
-25
lines changed

Desharp.config.example

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
4+
<startup>
5+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
6+
</startup>
7+
8+
9+
<!-- For web applications only - add Desharp http module by: -->
10+
<system.webServer>
11+
<modules>
12+
<add name="Desharp" type="Desharp.Module" preCondition="managedHandler" />
13+
</modules>
14+
<httpErrors errorMode="Detailed" />
15+
</system.webServer>
16+
17+
18+
<appSettings>
19+
20+
<!--
21+
If `true`, all dumps by method `Debug.Dump()` are internally rendered and displayed.
22+
For web applications, there is debug panel is displayed in browser with dumped variables or rendered exceptions.
23+
For desktop applications, there is console priniting enabled or output debug window printing enabled.
24+
- Not required to configure, but very recomanded.
25+
- Possible values: `1`, `0`, `true`, `false`.
26+
- If not configured - enabled is only when VS debugger is attached or entry assembly is builded as Debug.
27+
- If disabled - all `Debug.Log()` calls are still enabled and executed, see more option `Desharp:Levels`.
28+
-->
29+
<add key="Desharp:Enabled" value="1" />
30+
31+
<!--
32+
Logs content format.
33+
- Not required, `text` by default.
34+
- Possible values: `html`, `text`.
35+
-->
36+
<add key="Desharp:Output" value="html" />
37+
38+
<!--
39+
Client IP adresses list to limit `Desharp` enabled state only for some clients.
40+
- Not required to configure, very recomanded for web applications.
41+
- Possible values: IPv4 or IPv6, separated by comma (IPv6 without `[]` brackets).
42+
- If not configured and `Desharp` is in enabled state, then `Desharp` is enabled for all clients.
43+
-->
44+
<add key="Desharp:DebugIps" value="127.0.0.1,::1" />
45+
46+
<!--
47+
Loggin levels to enable/disable to write on hard drive and also possibility to enable/disable email notifications.
48+
- Not required, recomanded.
49+
- Possible values: `exception`, `debug`, `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`, `javascript`.
50+
- If not configured, all logging levels are enabled for logging and not enabled for email notifications.
51+
- If at least one level is configured, then all other configured levels are disabled for logging and for email notifications.
52+
- If you want to enable any logging level - put the level name into node `value` attribute (comma separated).
53+
- If you want to disable any logging level - put minus (-) character before level name or remove level name.
54+
- If you want to enable any logging level for email notifications - put plus (+) character before level name.
55+
-->
56+
<add key="Desharp:Levels" value="+exception,debug,info,-notice,-warning,+error,+critical,alert,+emergency,javascript" />
57+
58+
<!--
59+
Logged messages notifications by configured levels.
60+
- Not required, recomanded in production mode.
61+
- Possible values:
62+
- `host`: Required, mail server smtp domain | IPv4 | IPv6.
63+
- `port`: Not required, `25` by default.
64+
- `ssl`: Not required, `false` by default.
65+
- `from`: Required if no username and password specified, email address to specify sender, if no value specified, there is used `username` value.
66+
- `username` and `password`: Required if no `from` sender specified, mail server username/password credentials for sender account, always necessary to use together.
67+
- `domain` - Not required, no default value. Used only as third parametter for `System.Net.NetworkCredential` if presented.
68+
- `to`: Required, single recepient email adress or multiple adresses separated by semicolon `;`.
69+
- `priority`: Not required, possible values: `low` | `normal` | `high` (`normal` by defaut).
70+
- `timeout`: Not required, smtp server timeout specified in miliseconds, `10000` by default (10 seconds).
71+
- `background`: Not required at all. Default value is `true` to send all notifications in background thread.
72+
Use `false` value only to debug email sending.
73+
-->
74+
<add key="Desharp:NotifySettings" value="{
75+
host: 'smtp.company.com',
76+
port: 587,
77+
ssl: true,
78+
user: 'noreply@company.com',
79+
password: 'your-secret-password',
80+
from: 'noreply@company.com',
81+
to: 'your.name@gmail.com',
82+
priority: 'high',
83+
timeout: 30000
84+
}" />
85+
86+
<!--
87+
Web debug bar panels.
88+
- Not required, recomanded.
89+
- Full class names separated by comma `,`.
90+
- Panel class has to implement public interface: `Desharp.Panels.IPanel`
91+
- Panel class could implement interface: `Desharp.Panels.ISessionPanel`,
92+
where are method called when session is is read and written every request.
93+
- There are always enabled build-in panels for execution time, dumps and exceptions.
94+
- Build-in panels you can optionally use:
95+
- `Desharp.Panels.SystemInfo` - to display most important request info
96+
- `Desharp.Panels.Session` - to display basic session configuration and values
97+
- `Desharp.Panels.Routing` - to display matched MVC routes (still in TODO state)
98+
-->
99+
<add key="Desharp:Panels" value="Desharp.Panels.SystemInfo,Desharp.Panels.Session" />
100+
101+
<!--
102+
Absolute or relative path from application root directory.
103+
- Not required, recomanded.
104+
- Relative path from app root has to start with '~/' like: '~/Path/To/Logs'.
105+
- If not configured, all log files are written into application root directory.
106+
-->
107+
<add key="Desharp:Directory" value="~/Logs" />
108+
109+
<!--
110+
Always render source location from where dump has been called by `Debug.Dump()`.
111+
- Not required, recomanded.
112+
- Possible values: `1`, `0`, `true`, `false`.
113+
- If not configured, no dumps source locations are rendered in dump ouputs.
114+
-->
115+
<add key="Desharp:SourceLocation" value="1" />
116+
117+
<!--
118+
Milisecond timeout how often logged messages or exceptions are written from memory to hard drive.
119+
- Not required, recomanded for speed optimalization in production mode.
120+
- Possible values - use digits to define any miliseconds integer value.
121+
- If not configured, all messages or exceptions are written immediately
122+
in current thread, where is called `Desharp.Log()`.
123+
-->
124+
<add key="Desharp:WriteMiliseconds" value="5000" />
125+
126+
<!--
127+
.NET objects dumping depth.
128+
- Not required, recomanded for speed optimalization in production mode.
129+
- Possible values: just digit like `2`, `3`, `4` or `5`.
130+
- If not configured, `3` by default.
131+
-->
132+
<add key="Desharp:Depth" value="3" />
133+
134+
<!--
135+
Maximum length for dumped string values.
136+
- Not required, recomanded for speed optimalization in production mode.
137+
- Possible values: just digit like `512`, `1024` or `5000`...
138+
- If not configured, `1024` by default.
139+
-->
140+
<add key="Desharp:MaxLength" value="1024" />
141+
142+
<!--
143+
Custom web error page.
144+
- Not required, recomanded for production mode.
145+
- If `Desharp` is not enabled and there is uncaught exception in your application,
146+
you can use custom static error page to transfer into client browser.
147+
- If not configured - `Desharp` build-in error page is used by default with error 500.
148+
-->
149+
<add key="Desharp:ErrorPage" value="~/custom-error-page-500.html" />
150+
151+
<!--
152+
Dump all internal .NET events, properties ad fields in custom class instances,
153+
(created internally and usually for properties values )and all class instance
154+
member types marked with `System.Runtime.CompilerServices.CompillerGenerated`
155+
attribute or with `Desharp.Hidden` attribute.
156+
This option is usefull to see everything in memory.
157+
- Not required, recomanded only for deep development view.
158+
- Possible values: `1`, `0`, `true`, `false`.
159+
- If not configured, `false` by default.
160+
- If not configured or configured as `false`, you can hide
161+
your class members for dumping and logging by attributes:
162+
- [System.Runtime.CompilerServices.CompilerGenerated] - .NET standard.
163+
- [Desharp.Hidden] - shorter.
164+
-->
165+
<add key="Desharp:DumpCompillerGenerated" value="true" />
166+
167+
<!--
168+
Default editor param value.
169+
- Not required, marginal.
170+
- For automatic file opening in Visual Studio or in any other editor by rendered links:
171+
`<a href="editor://file=...&line=...&editor=MSVS2019">../File.cs:123</a>
172+
- Possible values: any string key to open your editor from html output by.
173+
- If not configured, value is automaticly detected by Visual Studio instalation on current system.
174+
-->
175+
<add key="Desharp:Editor" value="MSVS2019" />
176+
177+
</appSettings>
178+
</configuration>

ExampleConsoleCs.csproj

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<Import Project="packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
54
<PropertyGroup>
65
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
76
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,7 +9,7 @@
109
<AppDesignerFolder>Properties</AppDesignerFolder>
1110
<RootNamespace>ExampleConsoleCs</RootNamespace>
1211
<AssemblyName>ExampleConsoleCs</AssemblyName>
13-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1413
<FileAlignment>512</FileAlignment>
1514
<TargetFrameworkProfile />
1615
<PublishUrl>publish\</PublishUrl>
@@ -61,14 +60,19 @@
6160
<ErrorReport>prompt</ErrorReport>
6261
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
6362
<LangVersion>5</LangVersion>
63+
<Prefer32Bit>false</Prefer32Bit>
6464
</PropertyGroup>
6565
<ItemGroup>
6666
<Reference Include="Desharp, Version=1.3.0.0, Culture=neutral, PublicKeyToken=cd60d985c52bcd6f, processorArchitecture=MSIL">
67-
<HintPath>..\packages\Desharp.1.3.0\lib\net40\Desharp.dll</HintPath>
67+
<HintPath>packages\Desharp.1.3.0\lib\net40\Desharp.dll</HintPath>
68+
<Private>True</Private>
69+
</Reference>
70+
<Reference Include="Desharp.Tests, Version=1.3.0.1, Culture=neutral, processorArchitecture=MSIL">
71+
<HintPath>packages\Desharp.Tests.1.3.0.1\lib\net45\Desharp.Tests.dll</HintPath>
6872
<Private>True</Private>
6973
</Reference>
70-
<Reference Include="Desharp.Tests, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
71-
<HintPath>..\packages\Desharp.Tests.1.3.0\lib\net40\Desharp.Tests.dll</HintPath>
74+
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75+
<HintPath>packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
7276
<Private>True</Private>
7377
</Reference>
7478
<Reference Include="Microsoft.CSharp" />
@@ -77,6 +81,10 @@
7781
<Reference Include="System.Data" />
7882
<Reference Include="System.Data.DataSetExtensions" />
7983
<Reference Include="System.Runtime.Serialization" />
84+
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
85+
<HintPath>packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
86+
<Private>True</Private>
87+
</Reference>
8088
<Reference Include="System.Web" />
8189
<Reference Include="System.Web.Extensions" />
8290
</ItemGroup>
@@ -86,7 +94,10 @@
8694
</ItemGroup>
8795
<ItemGroup>
8896
<None Include="app.config" />
89-
<None Include="packages.config" />
97+
<None Include="Desharp.config.example" />
98+
<None Include="packages.config">
99+
<SubType>Designer</SubType>
100+
</None>
90101
</ItemGroup>
91102
<ItemGroup>
92103
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
@@ -97,10 +108,7 @@
97108
</ItemGroup>
98109
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
99110
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
100-
<PropertyGroup>
101-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
102-
</PropertyGroup>
103-
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
111+
<Error Condition="!Exists('packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
104112
</Target>
105113
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
106114
Other similar extension points exist, see Microsoft.Common.targets.

ExampleConsoleCs.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleConsoleCs", "ExampleConsoleCs.csproj", "{91A59AE6-D5BA-4445-86E4-78CB3EE20FBA}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Dev|Any CPU = Dev|Any CPU
12+
Release|Any CPU = Release|Any CPU
13+
EndGlobalSection
14+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15+
{91A59AE6-D5BA-4445-86E4-78CB3EE20FBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{91A59AE6-D5BA-4445-86E4-78CB3EE20FBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{91A59AE6-D5BA-4445-86E4-78CB3EE20FBA}.Dev|Any CPU.ActiveCfg = Dev|Any CPU
18+
{91A59AE6-D5BA-4445-86E4-78CB3EE20FBA}.Dev|Any CPU.Build.0 = Dev|Any CPU
19+
{91A59AE6-D5BA-4445-86E4-78CB3EE20FBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{91A59AE6-D5BA-4445-86E4-78CB3EE20FBA}.Release|Any CPU.Build.0 = Release|Any CPU
21+
EndGlobalSection
22+
GlobalSection(SolutionProperties) = preSolution
23+
HideSolutionNode = FALSE
24+
EndGlobalSection
25+
EndGlobal

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.0.0")]
36-
[assembly: AssemblyFileVersion("1.3.0.0")]
35+
[assembly: AssemblyVersion("1.3.0.1")]
36+
[assembly: AssemblyFileVersion("1.3.0.1")]

app.config

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<appSettings>
4-
<add key="Desharp:Enabled" value="1"/>
5-
<add key="Desharp:Output" value="html"/>
6-
<add key="Desharp:Levels" value="+exception,debug,info,-notice,-warning,+error,+critical,alert,+emergency,javascript"/>
7-
<add key="Desharp:Directory" value="~/logs"/>
8-
<add key="ClientSettingsProvider.ServiceUri" value=""/>
9-
<add key="aspnet:RoslynCompilerLocation" value="roslyn"/>
10-
</appSettings>
3+
<appSettings>
4+
<add key="Desharp:Enabled" value="1"/>
5+
<add key="Desharp:Output" value="html"/>
6+
<add key="Desharp:Levels" value="+exception,debug,info,-notice,-warning,+error,+critical,alert,+emergency,javascript"/>
7+
<add key="Desharp:Directory" value="~/logs"/>
8+
<add key="ClientSettingsProvider.ServiceUri" value=""/>
9+
<add key="aspnet:RoslynCompilerLocation" value="roslyn"/>
10+
</appSettings>
11+
<startup>
12+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
13+
</startup>
14+
<system.codedom>
15+
<compilers>
16+
<compiler
17+
language="c#;cs;csharp"
18+
extension=".cs"
19+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
20+
warningLevel="4"
21+
compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
22+
<compiler
23+
language="vb;vbs;visualbasic;vbscript"
24+
extension=".vb"
25+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
26+
warningLevel="4"
27+
compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
28+
</compilers>
29+
</system.codedom>
1130
</configuration>

packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Desharp" version="1.3.0" targetFramework="net40" />
4-
<package id="Desharp.Tests" version="1.3.0" targetFramework="net40" />
5-
<package id="Microsoft.CodeAnalysis" version="3.2.1" targetFramework="net45" />
6-
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net472" requireReinstallation="true" />
7-
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" requireReinstallation="true" />
4+
<package id="Desharp.Tests" version="1.3.0.1" targetFramework="net45" />
5+
<package id="Microsoft.CodeAnalysis" version="3.3.1" targetFramework="net45" />
6+
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net45" />
7+
<package id="System.ValueTuple" version="4.5.0" targetFramework="net45" />
88
</packages>

0 commit comments

Comments
 (0)