Permalink
Browse files

tiding up nugets

  • Loading branch information...
mstijak committed Aug 24, 2011
1 parent ef5ef11 commit 8c31953265318c263aa0e7527d32ab849dc13bf8
View
@@ -3,4 +3,5 @@
bin
obj
*.user
-/packages/*/
+/packages/*/
+/nuget/*/
View
@@ -7,6 +7,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codaxy.Common.Localization"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codaxy.Common.SqlServer", "Libraries\Codaxy.Common.SqlServer\Codaxy.Common.SqlServer.csproj", "{E4A358E2-2A98-4C47-83D7-F57E12A3C9C0}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuSpec", "NuSpec", "{53D1E255-7E03-46B4-9DDA-B1730126728B}"
+ ProjectSection(SolutionItems) = preProject
+ NuGet\Codaxy.Common.Localization\Codaxy.Common.Localization.nuspec = NuGet\Codaxy.Common.Localization\Codaxy.Common.Localization.nuspec
+ NuGet\Codaxy.Common\Codaxy.Common.nuspec = NuGet\Codaxy.Common\Codaxy.Common.nuspec
+ NuGet\Codaxy.Common.SqlServer\Codaxy.Common.SqlServer.nuspec = NuGet\Codaxy.Common.SqlServer\Codaxy.Common.SqlServer.nuspec
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -66,7 +66,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
- <PreBuildEvent>$(SolutionDir)Nuget\tools\nuget install $(ProjectDir)packages.config -o $(SolutionDir)Packages</PreBuildEvent>
+ <PreBuildEvent>$(SolutionDir)Nuget\nuget install $(ProjectDir)packages.config -o $(SolutionDir)Packages</PreBuildEvent>
</PropertyGroup>
<!-- 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.
@@ -18,7 +18,7 @@ public void CreateSchema(SqlScript[] scripts)
{
var db = server.Databases[databaseName];
if (db == null)
- throw new InvalidDatabaseOperationException(String.Format("Database '{0}' not found on server.", databaseName));
+ throw new InvalidDatabaseOperationException(String.Format("Database '{0}' not found on the server.", databaseName));
foreach (var script in scripts)
try
@@ -23,18 +23,25 @@ protected virtual void Validate()
protected Server GetServer(out String databaseName)
{
- SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder(ConnectionString);
- sc = new ServerConnection(csb.DataSource);
- if (!csb.IntegratedSecurity)
- {
- sc.LoginSecure = false;
- sc.Login = csb.UserID;
- sc.Password = csb.Password;
- }
- databaseName = csb.InitialCatalog;
- server = new Server(sc);
- //TODO: Validate server connection
- return server;
+ try
+ {
+ SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder(ConnectionString);
+ sc = new ServerConnection(csb.DataSource);
+ if (!csb.IntegratedSecurity)
+ {
+ sc.LoginSecure = false;
+ sc.Login = csb.UserID;
+ sc.Password = csb.Password;
+ }
+ databaseName = csb.InitialCatalog;
+ server = new Server(sc);
+ //TODO: Validate server connection
+ return server;
+ }
+ catch (Exception ex)
+ {
+ throw new InvalidDatabaseOperationException("Connection problem. Check inner exception for details.", ex);
+ }
}
public virtual void Dispose()
@@ -82,7 +82,7 @@ public bool UpgradeSchema(SqlScript[] scripts)
var server = GetServer(out databaseName);
var db = server.Databases[databaseName];
if (db == null)
- throw new InvalidDatabaseOperationException(String.Format("Database '{0}' not found on server.", databaseName));
+ throw new InvalidDatabaseOperationException(String.Format("Database '{0}' not found on the server.", databaseName));
String currentVersion;
@@ -35,7 +35,7 @@ void messageQueue_NewItems(object sender, ItemsEventArgs<LogEntry> e)
foreach (var le in e.Items)
{
- writer.WriteLine(String.Format("{0} {1:-10} {2}: {3}", le.Message.Time, le.Message.Level.ToString(), le.LoggerName, le.Message.Message));
+ writer.WriteLine(String.Format("{0:yyyy-MM-dd HH:mm:ss} {1:-10} {2}: {3}", le.Message.Time, le.Message.Level.ToString(), le.LoggerName, le.Message.Message));
if (le.Message.StackTrace != null)
{
writer.Write("\t\t\t");
@@ -3,11 +3,11 @@
<metadata schemaVersion="2">
<id>Codaxy.Common.Localization</id>
<title>Codaxy.Common.Localization Library</title>
- <version>0.5.4</version>
+ <version>0.5.5</version>
<authors>Codaxy</authors>
<description>Codaxy.Common.Localization Library provides helpers for application localization</description>
<dependencies>
<dependency id="Codaxy.Common" />
</dependencies>
- <projectUrl>http://code.google.com/p/codaxy-common2/</projectUrl></metadata>
+ <projectUrl>https://github.com/codaxy/common</projectUrl></metadata>
</package>
@@ -3,7 +3,7 @@
<metadata schemaVersion="2">
<id>Codaxy.Common.SqlServer</id>
<title>Codaxy.Common.SqlServer Library</title>
- <version>0.5.0</version>
+ <version>0.5.1</version>
<authors>Codaxy</authors>
<description>Codaxy.Common.SqlServer Library provides helpers for programatic database schema upgrade scenarios.</description>
<dependencies>
@@ -3,8 +3,8 @@
<metadata schemaVersion="2">
<id>Codaxy.Common</id>
<title>Codaxy.Common Library</title>
- <version>0.5.3</version>
+ <version>0.5.4</version>
<authors>Codaxy</authors>
<description>Codaxy.Common Library provides set of commonly used tools and utilities</description>
- <projectUrl>http://code.google.com/p/codaxy-common2/</projectUrl></metadata>
+ <projectUrl>https://github.com/codaxy/common</projectUrl></metadata>
</package>
File renamed without changes.
View
@@ -1,14 +1,16 @@
+del *.nupkg
+
mkdir Codaxy.Common\lib\
copy ..\Libraries\Codaxy.Common\bin\Release\*.* Codaxy.Common\lib\
-tools\nuget pack Codaxy.Common\Codaxy.Common.nuspec
+nuget pack Codaxy.Common\Codaxy.Common.nuspec
mkdir Codaxy.Common.Localization\lib\
copy ..\Libraries\Codaxy.Common.Localization\bin\Release\Codaxy.Common.Localization.* Codaxy.Common.Localization\lib\
-tools\nuget pack Codaxy.Common.Localization\Codaxy.Common.Localization.nuspec
+nuget pack Codaxy.Common.Localization\Codaxy.Common.Localization.nuspec
mkdir Codaxy.Common.SqlServer\lib\
copy ..\Libraries\Codaxy.Common.SqlServer\bin\Release\Codaxy.Common.SqlServer.* Codaxy.Common.SqlServer\lib\
-tools\nuget pack Codaxy.Common.SqlServer\Codaxy.Common.SqlServer.nuspec
+nuget pack Codaxy.Common.SqlServer\Codaxy.Common.SqlServer.nuspec

0 comments on commit 8c31953

Please sign in to comment.