Skip to content

Commit

Permalink
resolved problems with MVC version
Browse files Browse the repository at this point in the history
  • Loading branch information
Web Advanced committed Jan 4, 2012
1 parent 70a37aa commit 398b334
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 12 deletions.
8 changes: 7 additions & 1 deletion SimpleHoneypot.sln
@@ -1,12 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleHoneypot", "src\SimpleHoneypot\SimpleHoneypot.csproj", "{3E27554A-AF9A-4979-92AC-1C1B0B4BD225}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleHoneypot.NET4.MVC3", "src\SimpleHoneypot\SimpleHoneypot.NET4.MVC3.csproj", "{3E27554A-AF9A-4979-92AC-1C1B0B4BD225}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleHoneypot.Tests", "src\SimpleHoneypot.Tests\SimpleHoneypot.Tests.csproj", "{58FEC57A-EB7D-4681-A024-68FF8A9AE54A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleHoneypot.Web.Tests", "src\SimpleHoneypot.Web.Tests\SimpleHoneypot.Web.Tests.csproj", "{04738723-C466-474D-85F5-879816A1DAA9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleHoneypot.NET4.MVC2", "src\SimpleHoneypot.NET4.MVC2\SimpleHoneypot.NET4.MVC2.csproj", "{FEC824EF-381B-42C0-B704-AFFAA6D4DAF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -25,6 +27,10 @@ Global
{04738723-C466-474D-85F5-879816A1DAA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04738723-C466-474D-85F5-879816A1DAA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04738723-C466-474D-85F5-879816A1DAA9}.Release|Any CPU.Build.0 = Release|Any CPU
{FEC824EF-381B-42C0-B704-AFFAA6D4DAF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEC824EF-381B-42C0-B704-AFFAA6D4DAF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEC824EF-381B-42C0-B704-AFFAA6D4DAF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FEC824EF-381B-42C0-B704-AFFAA6D4DAF6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/App_Start/SimpleHoneypot.cs.pp
Expand Up @@ -2,7 +2,7 @@
using System.Web.Mvc;
using SimpleHoneypot.Core;

[assembly: WebActivator.PreApplicationStartMethod(typeof($rootnamespace$.App_Start.SimpleHoneypot), "Start")]
[assembly: WebActivator.PostApplicationStartMethod(typeof($rootnamespace$.App_Start.SimpleHoneypot), "Start")]

namespace $rootnamespace$.App_Start {
public static class SimpleHoneypot {
Expand Down
5 changes: 3 additions & 2 deletions buildscripts/Build.proj
Expand Up @@ -29,6 +29,7 @@

<ItemGroup>
<MainBinaries Include="$(BaseDir)\src\SimpleHoneypot\bin\$(Configuration)\**\*.*" />
<MainBinariesNET4MVC2 Include="$(BaseDir)\src\SimpleHoneypot.NET4.MVC2\bin\$(Configuration)\**\*.*" />
<AppStart Include="$(BaseDir)\buildscripts\App_start\**\*.*" />
</ItemGroup>

Expand All @@ -50,11 +51,11 @@

<!-- Copy the source files to the package dir -->
<Copy SourceFiles="@(MainBinaries)" DestinationFolder="$(PackageDir)\temp\SimpleHoneypot\lib\Net40\%(RecursiveDir)" />
<Copy SourceFiles="@(MainBinaries)" DestinationFolder="$(PackageDir)\temp\SimpleHoneypot\lib\Net20\%(RecursiveDir)" />
<Copy SourceFiles="@(MainBinariesNET4MVC2)" DestinationFolder="$(PackageDir)\temp\SimpleHoneypot\lib\Net40\%(RecursiveDir)" />
<Copy SourceFiles="@(AppStart)" DestinationFolder="$(PackageDir)\temp\SimpleHoneypot\lib\content\App_Start\%(RecursiveDir)" />

<!-- Get the version number of the main FV assembly to insert into the nuspec files -->
<GetAssemblyIdentity AssemblyFiles="$(OutputDir)\SimpleHoneypot\SimpleHoneypot.dll">
<GetAssemblyIdentity AssemblyFiles="$(OutputDir)\SimpleHoneypot\SimpleHoneypot.NET4.MVC3.dll">
<Output TaskParameter="Assemblies" ItemName="AsmInfo" />
</GetAssemblyIdentity>

Expand Down
4 changes: 2 additions & 2 deletions buildscripts/SimpleHoneypot.nuspec
Expand Up @@ -11,11 +11,11 @@
<summary>A simple honeypot to replace your standard reCAPTCHA for ASP.NET MVC2+.</summary>
<language>en-US</language>
<dependencies>
<dependency id="WebActivator" version="1.4.2" />
<dependency id="WebActivator" version="1.5" />
</dependencies>
</metadata>
<files>
<file src="lib\content\**\*.pp" target="content" />
<file src="lib\**\*.dll" target="lib" />
</files>
</package>
</package>
36 changes: 36 additions & 0 deletions src/SimpleHoneypot.NET4.MVC2/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SimpleHoneypot.NET4.MVC2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SimpleHoneypot.NET4.MVC2")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("148315c9-aab5-4677-a7ee-db05bcf63210")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
82 changes: 82 additions & 0 deletions src/SimpleHoneypot.NET4.MVC2/SimpleHoneypot.NET4.MVC2.csproj
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FEC824EF-381B-42C0-B704-AFFAA6D4DAF6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SimpleHoneypot</RootNamespace>
<AssemblyName>SimpleHoneypot.NET4.MVC2</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\simplehoneypot\actionfilters\HoneypotAttribute.cs">
<Link>ActionFilters\HoneypotAttribute.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\core\common\Check.cs">
<Link>Core\Common\Check.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\core\GlobalText.Designer.cs">
<Link>Core\GlobalText.Designer.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\core\Honeypot.cs">
<Link>Core\Honeypot.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\core\HoneypotInputNameCollection.cs">
<Link>Core\HoneypotInputNameCollection.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\core\services\HoneypotService.cs">
<Link>Core\Services\HoneypotService.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\core\services\IHoneypotService.cs">
<Link>Core\Services\IHoneypotService.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\extensions\HttpRequestBaseExtensions.cs">
<Link>Extensions\HttpRequestBaseExtensions.cs</Link>
</Compile>
<Compile Include="..\simplehoneypot\htmlhelpers\HoneypotHelper.cs">
<Link>HtmlHelpers\HoneypotHelper.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\simplehoneypot\core\GlobalText.resx">
<Link>Core\GlobalText.resx</Link>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
4 changes: 2 additions & 2 deletions src/SimpleHoneypot.Tests/SimpleHoneypot.Tests.csproj
Expand Up @@ -59,9 +59,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SimpleHoneypot\SimpleHoneypot.csproj">
<ProjectReference Include="..\SimpleHoneypot\SimpleHoneypot.NET4.MVC3.csproj">
<Project>{3E27554A-AF9A-4979-92AC-1C1B0B4BD225}</Project>
<Name>SimpleHoneypot</Name>
<Name>SimpleHoneypot.NET4.MVC3</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
4 changes: 2 additions & 2 deletions src/SimpleHoneypot.Web.Tests/SimpleHoneypot.Web.Tests.csproj
Expand Up @@ -144,9 +144,9 @@
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SimpleHoneypot\SimpleHoneypot.csproj">
<ProjectReference Include="..\SimpleHoneypot\SimpleHoneypot.NET4.MVC3.csproj">
<Project>{3E27554A-AF9A-4979-92AC-1C1B0B4BD225}</Project>
<Name>SimpleHoneypot</Name>
<Name>SimpleHoneypot.NET4.MVC3</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleHoneypot/Core/Common/Check.cs
Expand Up @@ -14,7 +14,7 @@ public static class Argument {

[DebuggerStepThrough]
public static void IsNotNullOrEmpty(string parameter, string parameterName) {
if (string.IsNullOrWhiteSpace(parameter)) {
if (string.IsNullOrEmpty(parameter)) {
throw new ArgumentException(String.Format(GlobalText.ArgumentCannotBeNullOrEmpty, parameterName), parameterName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleHoneypot/Properties/AssemblyInfo.cs
Expand Up @@ -30,6 +30,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.2.*")]
[assembly: AssemblyVersion("1.3.*")]
//[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
68 changes: 68 additions & 0 deletions src/SimpleHoneypot/SimpleHoneypot.NET4.MVC3.csproj
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3E27554A-AF9A-4979-92AC-1C1B0B4BD225}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SimpleHoneypot</RootNamespace>
<AssemblyName>SimpleHoneypot.NET4.MVC3</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
<Compile Include="ActionFilters\HoneypotAttribute.cs" />
<Compile Include="Core\Common\Check.cs" />
<Compile Include="Core\GlobalText.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>GlobalText.resx</DependentUpon>
</Compile>
<Compile Include="Core\Honeypot.cs" />
<Compile Include="Core\HoneypotInputNameCollection.cs" />
<Compile Include="Core\Services\HoneypotService.cs" />
<Compile Include="Core\Services\IHoneypotService.cs" />
<Compile Include="Extensions\HttpRequestBaseExtensions.cs" />
<Compile Include="HtmlHelpers\HoneypotHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Core\GlobalText.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>GlobalText.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

0 comments on commit 398b334

Please sign in to comment.