Skip to content

Commit 6662563

Browse files
committed
Add project files.
1 parent 72e964c commit 6662563

19 files changed

+900
-0
lines changed

DotNetOutputToConsole.sln

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.14.36705.20
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
7+
ProjectSection(SolutionItems) = preProject
8+
src\DotNetOutputToConsole\LICENSE = src\DotNetOutputToConsole\LICENSE
9+
src\DotNetOutputToConsole\README.md = src\DotNetOutputToConsole\README.md
10+
EndProjectSection
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetOutputToConsole", "src\DotNetOutputToConsole\DotNetOutputToConsole.csproj", "{5FE20856-E888-465D-AD6A-F939E7F37774}"
13+
EndProject
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DEA1D707-9B95-4B43-BA6F-F03508594B30}"
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "demo", "demo", "{243C3FB7-46CD-4108-B045-0B45F6BDC532}"
17+
EndProject
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetOutputToConsole.Tests", "tests\DotNetOutputToConsole.Tests\DotNetOutputToConsole.Tests.csproj", "{8D2FAC39-F7E1-4892-916B-CD025CCF93AD}"
19+
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetOutputToConsole.DemoWeb", "demo\DotNetOutputToConsole.DemoWeb\DotNetOutputToConsole.DemoWeb.csproj", "{AB6B7FF4-20E1-4597-9932-3985E21E809E}"
21+
EndProject
22+
Global
23+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
24+
Debug|Any CPU = Debug|Any CPU
25+
Release|Any CPU = Release|Any CPU
26+
EndGlobalSection
27+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
28+
{5FE20856-E888-465D-AD6A-F939E7F37774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29+
{5FE20856-E888-465D-AD6A-F939E7F37774}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{5FE20856-E888-465D-AD6A-F939E7F37774}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{5FE20856-E888-465D-AD6A-F939E7F37774}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{8D2FAC39-F7E1-4892-916B-CD025CCF93AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{8D2FAC39-F7E1-4892-916B-CD025CCF93AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{8D2FAC39-F7E1-4892-916B-CD025CCF93AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{8D2FAC39-F7E1-4892-916B-CD025CCF93AD}.Release|Any CPU.Build.0 = Release|Any CPU
36+
{AB6B7FF4-20E1-4597-9932-3985E21E809E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37+
{AB6B7FF4-20E1-4597-9932-3985E21E809E}.Debug|Any CPU.Build.0 = Debug|Any CPU
38+
{AB6B7FF4-20E1-4597-9932-3985E21E809E}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{AB6B7FF4-20E1-4597-9932-3985E21E809E}.Release|Any CPU.Build.0 = Release|Any CPU
40+
EndGlobalSection
41+
GlobalSection(SolutionProperties) = preSolution
42+
HideSolutionNode = FALSE
43+
EndGlobalSection
44+
GlobalSection(NestedProjects) = preSolution
45+
{5FE20856-E888-465D-AD6A-F939E7F37774} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
46+
{8D2FAC39-F7E1-4892-916B-CD025CCF93AD} = {DEA1D707-9B95-4B43-BA6F-F03508594B30}
47+
{AB6B7FF4-20E1-4597-9932-3985E21E809E} = {243C3FB7-46CD-4108-B045-0B45F6BDC532}
48+
EndGlobalSection
49+
GlobalSection(ExtensibilityGlobals) = postSolution
50+
SolutionGuid = {9D4B5F62-CE47-46CB-8F03-2837F58A3F9F}
51+
EndGlobalSection
52+
EndGlobal
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DotNetOutputToConsole.DemoWeb.Default" %>
2+
<!DOCTYPE html>
3+
<html><head runat="server"><title>DotNetOutputToConsole Demo</title></head>
4+
<body>
5+
<form id="form1" runat="server">
6+
<h2>DotNetOutputToConsole Demo Page</h2>
7+
<asp:Button ID="btnTest" runat="server" Text="Run Demo" OnClick="btnTest_Click" />
8+
</form>
9+
</body></html>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using DotNetOutputToConsole;
3+
4+
namespace DotNetOutputToConsole.DemoWeb
5+
{
6+
public partial class Default : System.Web.UI.Page
7+
{
8+
protected void Page_Load(object sender, EventArgs e)
9+
{
10+
11+
}
12+
13+
protected void btnTest_Click(object sender, EventArgs e)
14+
{
15+
DotNetOutputToConsoleLogger.LogInfo("Button clicked");
16+
DotNetOutputToConsoleLogger.LogVariable("CurrentUser", Environment.UserName);
17+
try {
18+
throw new InvalidOperationException("Sample exception thwrow");
19+
}
20+
catch (Exception ex)
21+
{
22+
DotNetOutputToConsoleLogger.LogError(ex.Message);
23+
}
24+
}
25+
}
26+
}

demo/DotNetOutputToConsole.DemoWeb/Default.aspx.designer.cs

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<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')" />
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProductVersion>
8+
</ProductVersion>
9+
<SchemaVersion>2.0</SchemaVersion>
10+
<ProjectGuid>{AB6B7FF4-20E1-4597-9932-3985E21E809E}</ProjectGuid>
11+
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
12+
<OutputType>Library</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<RootNamespace>DotNetOutputToConsole.DemoWeb</RootNamespace>
15+
<AssemblyName>DotNetOutputToConsole.DemoWeb</AssemblyName>
16+
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
17+
<UseIISExpress>true</UseIISExpress>
18+
<Use64BitIISExpress />
19+
<IISExpressSSLPort>44381</IISExpressSSLPort>
20+
<IISExpressAnonymousAuthentication />
21+
<IISExpressWindowsAuthentication />
22+
<IISExpressUseClassicPipelineMode />
23+
<UseGlobalApplicationHostFile />
24+
<NuGetPackageImportStamp>
25+
</NuGetPackageImportStamp>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
28+
<DebugSymbols>true</DebugSymbols>
29+
<DebugType>full</DebugType>
30+
<Optimize>false</Optimize>
31+
<OutputPath>bin\</OutputPath>
32+
<DefineConstants>DEBUG;TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
37+
<DebugSymbols>true</DebugSymbols>
38+
<DebugType>pdbonly</DebugType>
39+
<Optimize>true</Optimize>
40+
<OutputPath>bin\</OutputPath>
41+
<DefineConstants>TRACE</DefineConstants>
42+
<ErrorReport>prompt</ErrorReport>
43+
<WarningLevel>4</WarningLevel>
44+
</PropertyGroup>
45+
<ItemGroup>
46+
<Reference Include="Microsoft.CSharp" />
47+
<Reference Include="System.Web.DynamicData" />
48+
<Reference Include="System.Web.Entity" />
49+
<Reference Include="System.Web.ApplicationServices" />
50+
<Reference Include="System.ComponentModel.DataAnnotations" />
51+
<Reference Include="System" />
52+
<Reference Include="System.Data" />
53+
<Reference Include="System.Core" />
54+
<Reference Include="System.Data.DataSetExtensions" />
55+
<Reference Include="System.Web.Extensions" />
56+
<Reference Include="System.Xml.Linq" />
57+
<Reference Include="System.Drawing" />
58+
<Reference Include="System.Web" />
59+
<Reference Include="System.Xml" />
60+
<Reference Include="System.Configuration" />
61+
<Reference Include="System.Web.Services" />
62+
<Reference Include="System.EnterpriseServices" />
63+
</ItemGroup>
64+
<ItemGroup>
65+
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform">
66+
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
67+
</Reference>
68+
</ItemGroup>
69+
<ItemGroup>
70+
<Content Include="Default.aspx" />
71+
<Content Include="Web.config" />
72+
</ItemGroup>
73+
<ItemGroup>
74+
<Compile Include="Default.aspx.cs">
75+
<DependentUpon>Default.aspx</DependentUpon>
76+
<SubType>ASPXCodeBehind</SubType>
77+
</Compile>
78+
<Compile Include="Default.aspx.designer.cs">
79+
<DependentUpon>Default.aspx</DependentUpon>
80+
</Compile>
81+
<Compile Include="Properties\AssemblyInfo.cs" />
82+
</ItemGroup>
83+
<ItemGroup>
84+
<None Include="packages.config" />
85+
<None Include="Web.Debug.config">
86+
<DependentUpon>Web.config</DependentUpon>
87+
</None>
88+
<None Include="Web.Release.config">
89+
<DependentUpon>Web.config</DependentUpon>
90+
</None>
91+
</ItemGroup>
92+
<ItemGroup>
93+
<ProjectReference Include="..\..\src\DotNetOutputToConsole\DotNetOutputToConsole.csproj">
94+
<Project>{5fe20856-e888-465d-ad6a-f939e7f37774}</Project>
95+
<Name>DotNetOutputToConsole</Name>
96+
</ProjectReference>
97+
</ItemGroup>
98+
<PropertyGroup>
99+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
100+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
101+
</PropertyGroup>
102+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
103+
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
104+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
105+
<ProjectExtensions>
106+
<VisualStudio>
107+
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
108+
<WebProjectProperties>
109+
<UseIIS>True</UseIIS>
110+
<AutoAssignPort>True</AutoAssignPort>
111+
<DevelopmentServerPort>6708</DevelopmentServerPort>
112+
<DevelopmentServerVPath>/</DevelopmentServerVPath>
113+
<IISUrl>https://localhost:44381/</IISUrl>
114+
<NTLMAuthentication>False</NTLMAuthentication>
115+
<UseCustomServer>False</UseCustomServer>
116+
<CustomServerUrl>
117+
</CustomServerUrl>
118+
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
119+
</WebProjectProperties>
120+
</FlavorProperties>
121+
</VisualStudio>
122+
</ProjectExtensions>
123+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
124+
<PropertyGroup>
125+
<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>
126+
</PropertyGroup>
127+
<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'))" />
128+
</Target>
129+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
130+
Other similar extension points exist, see Microsoft.Common.targets.
131+
<Target Name="BeforeBuild">
132+
</Target>
133+
<Target Name="AfterBuild">
134+
</Target>
135+
-->
136+
</Project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("DotNetOutputToConsole.DemoWeb")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("DotNetOutputToConsole.DemoWeb")]
13+
[assembly: AssemblyCopyright("Copyright © 2025")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("ab6b7ff4-20e1-4597-9932-3985e21e809e")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<!--
19+
In the example below, the "Replace" transform will replace the entire
20+
<customErrors> section of your web.config file.
21+
Note that because there is only one customErrors section under the
22+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
23+
24+
<customErrors defaultRedirect="GenericError.htm"
25+
mode="RemoteOnly" xdt:Transform="Replace">
26+
<error statusCode="500" redirect="InternalError.htm"/>
27+
</customErrors>
28+
-->
29+
</system.web>
30+
</configuration>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<compilation xdt:Transform="RemoveAttributes(debug)" />
19+
<!--
20+
In the example below, the "Replace" transform will replace the entire
21+
<customErrors> section of your web.config file.
22+
Note that because there is only one customErrors section under the
23+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
24+
25+
<customErrors defaultRedirect="GenericError.htm"
26+
mode="RemoteOnly" xdt:Transform="Replace">
27+
<error statusCode="500" redirect="InternalError.htm"/>
28+
</customErrors>
29+
-->
30+
</system.web>
31+
</configuration>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
For more information on how to configure your ASP.NET application, please visit
4+
https://go.microsoft.com/fwlink/?LinkId=169433
5+
-->
6+
<configuration>
7+
<appSettings>
8+
<add key="EnableOutputToConsole" value="true" />
9+
</appSettings>
10+
<system.web>
11+
<compilation debug="true" targetFramework="4.8.1" />
12+
<httpRuntime targetFramework="4.8.1" />
13+
</system.web>
14+
<system.webServer>
15+
<modules>
16+
<add name="DotNetOutputToConsoleHttpModule" type="DotNetOutputToConsole.DotNetOutputToConsoleHttpModule" />
17+
</modules>
18+
</system.webServer>
19+
<system.codedom>
20+
<compilers>
21+
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
22+
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
23+
</compilers>
24+
</system.codedom>
25+
</configuration>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net481" />
4+
</packages>

0 commit comments

Comments
 (0)