Permalink
Browse files

Remove dependency on Spring.Core.Tests, fixing configuration settings…

… and support for RELEASE builds
  • Loading branch information...
1 parent f0ccd04 commit 19a7a77551b68405b22a8c6d3a14fe97eab4dad8 @sbohlen sbohlen committed Mar 14, 2011
View
@@ -1,23 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B47D1EF8-ADD6-4F71-857F-64D54D0636F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B47D1EF8-ADD6-4F71-857F-64D54D0636F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B47D1EF8-ADD6-4F71-857F-64D54D0636F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B47D1EF8-ADD6-4F71-857F-64D54D0636F3}.Release|Any CPU.Build.0 = Release|Any CPU
- {6F7D91FF-0DC5-4E1D-9F6F-01EFBF636A20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6F7D91FF-0DC5-4E1D-9F6F-01EFBF636A20}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6F7D91FF-0DC5-4E1D-9F6F-01EFBF636A20}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6F7D91FF-0DC5-4E1D-9F6F-01EFBF636A20}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
View
@@ -8,7 +8,13 @@
<property name="lib.dir" value="${root.dir}/lib" />
<property name="package.dir" value="${root.dir}/package" />
<property name="doc.dir" value="${root.dir}/doc" />
+ <property name="project.sign" value="false" overwrite="false" />
+ <property name="compiling.examples" value="false" overwrite="true" />
+ <if test="${project.sign and not(file::exists(root.dir + '/Spring.Net.snk'))}">
+ <fail message="project.sign='true' but keyfile ${root.dir+'/Spring.Net.snk'} is missing" />
+ </if>
+
<property name="project.majorversion" value="1.0" />
<property name="project.patchversion" value="0" overwrite="false" />
<property name="project.buildnumber" value="${math::abs(math::floor(timespan::get-total-days(datetime::now() - datetime::parse('01/01/2000'))))}" />
@@ -137,18 +143,19 @@
</target>
- <target name="package.binaries" depends1="build">
+ <target name="package.binaries" depends="build">
<echo message="Processing ${build.dir}\net-2.0"/>
- <copy todir="${package.dir}/bin/net/2.0/debug" flatten="true" verbose="true">
+ <copy todir="${package.dir}/bin/net/2.0/" flatten="true" verbose="true">
<fileset>
- <include name="${build.dir}\net-2.0\Spring.Config*.???"/>
+ <include name="${build.dir}\net-2.0\Spring.Core.Config*.???"/>
</fileset>
</copy>
- <!--
- <echo message="Processing ${build.dir}\net-4.0"/>
- <copy todir="${package.dir}/bin/net/4.0/debug" flatten="true" verbose="true">
+
+ <!--
+ <echo message="Processing ${build.dir}\net-3.5"/>
+ <copy todir="${package.dir}/bin/net/3.5/" flatten="true" verbose="true">
<fileset>
- <include name="${build.dir}\net-4.0\Spring.Config*.???"/>
+ <include name="${build.dir}\net-3.5\Spring.Core.Config*.???"/>
</fileset>
</copy>
-->
@@ -367,6 +374,7 @@ ${tool.dir} : dir for tools
<items basedir="${root.dir}">
<exclude name="**/tools/**" />
<exclude name="**/examples/**" />
+ <exclude name="**/package/**" />
<include name="**/*.sln" />
</items>
</in>
@@ -379,12 +387,15 @@ ${tool.dir} : dir for tools
</target>
<target name="RebuildExampleSolutions" depends="RebuildAllSolutions">
- <foreach item="File" property="filename">
+ <!-- never sign/stong-name the example solutions, even when the we're signing the main binaries -->
+ <property name="compiling.examples" value="true" />
+
+ <foreach item="File" property="filename">
<in>
<items basedir="${root.dir}/examples">
<include name="**/*.sln" />
</items>
- </in>
+ </in>z
<do>
<property name="solutionfile" value="${filename}" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
@@ -402,6 +413,9 @@ ${tool.dir} : dir for tools
<arg value="${solutionfile}"/>
<arg line="/nologo" />
<arg line="/property:Configuration=${solutionconfiguration}"/>
+ <arg value="/property:DefineExtraConstants=STRONG" if="${project.sign and not compiling.examples}" />
+ <arg value="/property:SignAssembly=true" if="${project.sign and not compiling.examples}" />
+ <arg value="/property:AssemblyOriginatorKeyFile=..\..\Spring.Net.snk" if="${project.sign and not compiling.examples}" />
</exec>
</target>
View
@@ -1,9 +1,7 @@
-REM other targets are:
-REM 'build'
-
@ECHO OFF
cls
-.\tools\nant\bin\nant.exe -f:Spring.Windows.build package-zip -D:project.sign=true -D:project.releasetype=release > buildlog.txt
+.\tools\nant\bin\nant.exe -f:Spring.Config.build package-zip -D:project.sign=true -D:project.releasetype=release -D:buildconfiguration=Release > buildlog.txt
+@rem .\tools\nant\bin\nant.exe -f:Spring.Config.build package-zip -D:project.sign=true -D:project.releasetype=release > buildlog.txt
start "ignored but required placeholder window title argument" buildlog.txt
Binary file not shown.
View
@@ -1,21 +1,25 @@
-The Spring Code Config project for .NET, Release 1.0.0 (Date TBD)
+The Spring Code Config project for .NET, Release 1.0.0 (3/15/2011)
--------------------------------------------------------------------
https://github.com/SpringSource/spring-net-codeconfig
1. INTRODUCTION
-The 1.0.0 release of Spring Code Config for NET contains
+The 1.0.0 release of Spring Code Config for NET provides:
- * A ...
+ * the ability to configure a Spring container using standard .NET code instead of or in addition to XML configuration
2. SUPPORTED .NET FRAMEWORK VERSIONS
-Spring Code Config for .NET 1.0 supports .NET 3.5 and 4.0
+Spring Code Config for .NET version 1.0 supports the .NET 2.0 and later framework runtimes (but REQUIRES Visual Studio 2008 or later, even when targeting .NET 2.0 -- see KNOWN ISSUES/LIMITATIONS for details).
-3. KNOWN ISSUES
+3. KNOWN ISSUES/LIMITATIONS
-None
+* Initial Features
+This initial relase of Spring Code Config for .NET supports the basic configuration of Object Definitions Metadata related to object construction but does not (yet) support the more advanced features of the Spring.NET Dependency Injection container including the application of Aspects, the subsitution of VariablePlaceholderValues, and others. This support will be provided in subsequent releases of this project.
+
+* Compiler Warning
+You may receive the following warning when compiling your projects when referencing Spring Code Config for .NET: "Warning: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from '<path-to-System.Core.dll>'. To extend the behavior of the AbstractApplicationContext, extension methods have been used. To enable extension methods under .NET 2.0 where they would otherwise be unsupported, the work-around as described here http://www.danielmoth.com/Blog/Using-Extension-Methods-In-Fx-20-Projects.aspx has been employed. Depending on your targeted runtime version, this approach can result in the preceeding warning being issued by the compiler. This warning can be safely ignored as it will not impact the functionality of the Spring Code Config for .NET or your own application.
4. RELEASE INFO
@@ -34,14 +38,15 @@ Latest info is available at the public website: http://www.springframework.net/
Spring Code Config for .NET is released under the terms of the Apache Software License (see license.txt).
-
5. DISTRIBUTION DLLs
-The "bin" directory contains the following distinct dll files for use in applications. Dependencies are those other than on the .NET BCL.
+The "bin" directory contains the following distinct dll files for use in applications:
+* Spring.Core.CodeConfig
+
6. WHERE TO START?
Documentation can be found in the "docs" directory:
-* The Spring for WPF reference documentation
+* The Spring.NET CodeConfig reference documentation
Documented sample applications can be found in "examples":
@@ -51,7 +56,6 @@ VS.NET
------
The is a solution file for different version of VS.NET
-* Spring.Config.2008.sln for use with VS.NET 2008
* Spring.Config.2010.sln for use with VS.NET 2010
8. Support
@@ -22,8 +22,8 @@
[assembly: AssemblyCopyrightAttribute("Copyright 2010 SpringSource.")]
[assembly: AssemblyTrademarkAttribute("Apache License, Version 2.0")]
[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("1.0.0.4085")]
-[assembly: AssemblyConfigurationAttribute("net-4.0.win32; dev")]
-[assembly: AssemblyInformationalVersionAttribute("1.0.0.4085; net-4.0.win32; dev")]
+[assembly: AssemblyVersionAttribute("1.0.0.4090")]
+[assembly: AssemblyConfigurationAttribute("net-4.0.win32; release")]
+[assembly: AssemblyInformationalVersionAttribute("1.0.0.4090; net-4.0.win32; release")]
[assembly: AssemblyDelaySignAttribute(false)]
@@ -28,10 +28,11 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
+ <OutputPath>..\..\build\net-2.0\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\build\net-2.0\Spring.Core.Configuration.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Common.Logging">
@@ -41,9 +41,6 @@
<Reference Include="Spring.Core">
<HintPath>..\..\lib\net\2.0\Spring.Core.dll</HintPath>
</Reference>
- <Reference Include="Spring.Core.Tests">
- <HintPath>..\..\lib\net\2.0\Spring.Core.Tests.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@@ -0,0 +1,144 @@
+#region License
+
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#endregion
+
+#region Imports
+
+using System;
+using System.IO;
+using System.Text;
+
+using Spring.Core.IO;
+
+#endregion
+
+namespace Spring.Objects.Factory.Xml
+{
+ /// <summary>
+ /// Centralised resource getter for loading all of those XML object
+ /// definition files used in the XML based object factory tests.
+ /// </summary>
+ /// <author>Rick Evans (.NET)</author>
+ /// <author>Erich Eichinger (.NET)</author>
+ public class ReadOnlyXmlTestResource : IResource
+ {
+ private readonly IResource underlyingResource;
+ private const string TestDataFolder = ".";
+
+ /// <summary>
+ /// Creates a new instance of the
+ /// <see cref="Spring.Objects.Factory.Xml.ReadOnlyXmlTestResource"/> class.
+ /// </summary>
+ /// <param name="fileName">
+ /// The filename/resourcename (e.g. foo.txt) of the XML file containing the object
+ /// definitions.
+ /// </param>
+ public ReadOnlyXmlTestResource (string fileName)
+ {
+ if (ConfigurableResourceLoader.HasProtocol(fileName))
+ {
+ ConfigurableResourceLoader loader = new ConfigurableResourceLoader();
+ underlyingResource = loader.GetResource(fileName);
+ }
+ underlyingResource = new FileSystemResource(fileName);
+ }
+
+ /// <summary>
+ /// Creates a new instance of the
+ /// <see cref="Spring.Objects.Factory.Xml.ReadOnlyXmlTestResource"/> class.
+ /// </summary>
+ /// <param name="fileName">
+ /// The filename/resourcename (e.g. foo.txt) of the XML file containing the object
+ /// definitions.
+ /// </param>
+ /// <param name="associatedTestType">
+ /// The <see cref="System.Type"/> of the test class utilising said file.
+ /// </param>
+ public ReadOnlyXmlTestResource (string fileName, Type associatedTestType)
+ : this (ReadOnlyXmlTestResource.GetFilePath (fileName, associatedTestType))
+ {
+ }
+
+ public IResource CreateRelative(string relativePath)
+ {
+ return this.underlyingResource.CreateRelative(relativePath);
+ }
+
+ public bool IsOpen
+ {
+ get { return this.underlyingResource.IsOpen; }
+ }
+
+ public Uri Uri
+ {
+ get { return this.underlyingResource.Uri; }
+ }
+
+ public FileInfo File
+ {
+ get { return this.underlyingResource.File; }
+ }
+
+ public string Description
+ {
+ get { return this.underlyingResource.Description; }
+ }
+
+ public bool Exists
+ {
+ get { return this.underlyingResource.Exists; }
+ }
+
+ public Stream InputStream
+ {
+ get { return this.underlyingResource.InputStream; }
+ }
+
+ public static string GetFilePath (string fileName, Type associatedTestType)
+ {
+ if (associatedTestType == null)
+ {
+ return fileName;
+ }
+
+ // check filesystem
+ StringBuilder path = new StringBuilder (TestDataFolder).Append (Path.DirectorySeparatorChar.ToString());
+ path.Append (associatedTestType.Namespace.Replace (".", Path.DirectorySeparatorChar.ToString()));
+ path.Append (Path.DirectorySeparatorChar.ToString()).Append (fileName);
+
+ FileInfo file = new FileInfo(path.ToString());
+ if (file.Exists)
+ {
+ return path.ToString ();
+ }
+ else
+ {
+ // interpret as assembly resource
+ fileName = "assembly://" + associatedTestType.Assembly.FullName + "/" + associatedTestType.Namespace
+ + "/" + fileName;
+ return fileName;
+ }
+ }
+
+ public override string ToString()
+ {
+ return Description;
+ }
+ }
+}
@@ -41,9 +41,6 @@
<Reference Include="Spring.Core">
<HintPath>..\..\lib\net\2.0\Spring.Core.dll</HintPath>
</Reference>
- <Reference Include="Spring.Core.Tests">
- <HintPath>..\..\lib\net\2.0\Spring.Core.Tests.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
@@ -64,6 +61,7 @@
<Compile Include="Example\Scannable\IFooDao.cs" />
<Compile Include="Example\Scannable\IFooService.cs" />
<Compile Include="Context\Support\CodeConfigApplicationContextTests.cs" />
+ <Compile Include="Objects\Factory\Xml\ReadOnlyXmlTestResource.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>

0 comments on commit 19a7a77

Please sign in to comment.