Skip to content

Commit

Permalink
upgraded project type to multi-targetting + improved minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenwezel committed Jan 10, 2025
1 parent 68f1b01 commit 3a2d778
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 81 deletions.
9 changes: 0 additions & 9 deletions Demo/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@ Option Strict On

Imports System.Reflection
Imports System.Runtime.InteropServices

<Assembly: AssemblyTitle("CompuMaster.Net.Smtp Demo")>
<Assembly: AssemblyDescription("CompuMaster.Net.Smtp")>
<Assembly: AssemblyCompany("CompuMaster GmbH")>
<Assembly: AssemblyProduct("CompuMaster.Net.Smtp")>
<Assembly: AssemblyCopyright("2001-2020 CompuMaster GmbH")>
<Assembly: AssemblyTrademark("camm")>

<Assembly: CLSCompliant(True)>
<Assembly: ComVisibleAttribute(False)>
<Assembly: System.Security.AllowPartiallyTrustedCallers()>
<Assembly: Guid("03ce2411-7c53-431e-9c07-a784b6201ce2")>

<Assembly: AssemblyVersion("2020.01.30.100")>
81 changes: 18 additions & 63 deletions Demo/Demo.vbproj
Original file line number Diff line number Diff line change
@@ -1,50 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1617C70F-901C-49F7-B204-144B7012B992}</ProjectGuid>
<TargetFrameworks>net48</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Demo</RootNamespace>
<AssemblyName>Demo</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Console</MyType>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<Deterministic>true</Deterministic>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Configurations>CI_CD;Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>Demo.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>Demo.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup>
<StartupObject>Sub Main</StartupObject>
<AssemblyTitle>CompuMaster.Net.Smtp Demo</AssemblyTitle>
<Description>CompuMaster.Net.Smtp</Description>
<Company>CompuMaster GmbH</Company>
<Product>CompuMaster.Net.Smtp</Product>
<Copyright>2001-2020 CompuMaster GmbH</Copyright>
<AssemblyVersion>2020.01.30.100</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CI_CD|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -53,57 +31,38 @@
<OutputPath>bin\CI_CD\</OutputPath>
<DocumentationFile>Demo.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
</ItemGroup>
<ItemGroup>
<Compile Include="DemoApp.vb" />
<Compile Include="AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<Compile Update="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<Compile Update="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<Compile Update="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<EmbeddedResource Update="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="My Project\Application.myapp">
<None Update="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<None Update="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
Expand All @@ -115,10 +74,6 @@
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CompuMaster.Net.Smtp\CompuMaster.Net.Smtp.vbproj">
<Project>{da3fe988-c378-453e-b5cf-5662961ace55}</Project>
<Name>CompuMaster.Net.Smtp</Name>
</ProjectReference>
<ProjectReference Include="..\CompuMaster.Net.Smtp\CompuMaster.Net.Smtp.vbproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>
16 changes: 9 additions & 7 deletions Demo/DemoApp.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ Public Module DemoApp

Public Sub Main()

Dim MySmtpWorker As New SmtpWorker

'Ask user of DemoApp for most important settings (optionally add more if required for your demo environment)
My.Settings.SmtpServerName = InputBox("SmtpServerName",, My.Settings.SmtpServerName)
If My.Settings.SmtpServerName = Nothing Then Return
My.Settings.TestRecipientAddress = InputBox("TestRecipientAddress",, My.Settings.TestRecipientAddress)
If My.Settings.TestRecipientAddress = Nothing Then Return
My.Settings.Save()

'Setup SmtpWorker settings
Dim MySmtpWorker As New SmtpWorker With {
.SmtpServerName = My.Settings.SmtpServerName,
.SmtpServerPort = My.Settings.SmtpServerPort,
.SmtpAuthType = My.Settings.SmtpAuthType,
.SmtpUserName = My.Settings.SmtpUsername,
.SmtpPassword = My.Settings.SmtpPassword
}
MySmtpWorker.SmtpServerName = My.Settings.SmtpServerName
MySmtpWorker.SmtpServerPort = My.Settings.SmtpServerPort
MySmtpWorker.SmtpAuthType = My.Settings.SmtpAuthType
MySmtpWorker.SmtpUserName = My.Settings.SmtpUsername
MySmtpWorker.SmtpPassword = My.Settings.SmtpPassword

'Prepare email message
Dim MyAttachment As New EMailAttachment("logo_64x64.png", "logo")
Expand Down
2 changes: 1 addition & 1 deletion Demo/My Project/Resources.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Demo/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a2d778

Please sign in to comment.