Author’s Archive: ЈЦЅГЇП €ΘΘΚ

Home / ЈЦЅГЇП €ΘΘΚ
48 Posts

The database backup is named like “Something_[1-x].bak”, where x is the number of backup file parts.

  • $(DB) is the database name
  • $(CHUNKS) is the number of backup file parts
  • $(PATH) is the path of the first backup file (assumes all of the backup files are in the same directory)

We have a ClickOnce application for which we are merging and/or embedding all of our dependency assemblies into a single assembly and obfuscating with Red Gate’s SmartAssembly. ClickOnce doesn’t know about the merging and embedding, so it includes the non-obfuscated individual assembly files when it publishes. It turns out that it’s easy to exclude these files from the deployment at publish-time from Visual Studio.

From Project properties …
Publish tab …
Application Files button …
Select “Exclude” for the Publish Status of the desired files …
Save project …
Publish.

To do this to an already-published ClickOnce application requires more work. Here’s a LINQPad script example to programmatically find a file, remove it and re-sign the appropriate files.

This is a revised version of a solution I lifted from internet postings.

Pilfered and tweaked from internet postings.

s1 is the start of Window 1
e1 is the end of Window 1
s2 is the start of Window 2
e2 is the end of Window 2
s1 < e1
s2 < e2
Window 1 Total Days = (e1 – s1) + 1
>Window 2 Total Days = (e2 – s2) + 1

Example Usage:

TimeWindows

TimeWindowsExampleOutput

Related: Generate Unique Namespace (in DNS Name Format)

 

cropped-ThisJustIn.png

My ISP upgraded the site from MS Server 2003 \ IIS 6 to MS Server 2012 \ IIS 8. That’s great, but it broke my old BlogEngine. I’ll be re-creating [from backups] such gems as the largest Excel cell address, and the best ending comment for a SQL stored procedure.

They aren’t a great loss, but I miss them.