Permalink
Browse files

Change TargetFrameworkVersion to 4.0 to run tests in VS2010

Fix Null Exception in CreateAttachment, Check name parameter exists before use. (And Test for MessageWithAttachmentToMIME822)
  • Loading branch information...
1 parent 4c6d89d commit af1fae4cc33ae57acc343e8cfa150beebb952387 @NiKiZe NiKiZe committed Mar 2, 2013
Showing with 5 additions and 2 deletions.
  1. +1 −1 MessageBuilder.cs
  2. +3 −0 S22.Imap.sln
  3. +1 −1 Tests/Tests.csproj
View
@@ -307,7 +307,7 @@ internal static class MessageBuilder {
// Many MUAs put the file name in the name parameter of the content-type
// header instead of the filename parameter of the content-disposition
// header.
- if (String.IsNullOrEmpty(name))
+ if (String.IsNullOrEmpty(name) && part.Parameters.ContainsKey("name"))
name = part.Parameters["name"];
if (String.IsNullOrEmpty(name))
name = Path.GetRandomFileName();
View
@@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "S22.Imap", "S22.Imap.csproj", "{369C32A5-E099-4BD5-BBBF-51713947CA99}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{9F52283D-B191-4145-8EF0-B2C69D7A193E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {369C32A5-E099-4BD5-BBBF-51713947CA99} = {369C32A5-E099-4BD5-BBBF-51713947CA99}
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
View
@@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>S22.Imap.Test</RootNamespace>
<AssemblyName>S22.Imap.Test</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

0 comments on commit af1fae4

Please sign in to comment.