I stopped to use GoogleDrive in favor to EverNote.

For a long time I’ve used Google Docs to write different notes, collect links for search and drafts of my posts.

Later on IPad I’ve started to use EverNote. The main advantage for me was that EverNote allows to create new notes when offline and even for normal account usually allow access existing notes (but sometimes telling that a note is not available). And since EverNote implemented auto save on IPad, I stopped using Google Drive. I am able to use EverNote Desktop on home and work PCs, from different browsers, from IPad and Windows Phone.

Additional very convenient tool on IPad is EverClip ( http://clip.ignition.hk/?locale=en&utm_source=homepage ), that copies text together with the URL(from Browser page) to notes. I am missing similar facility in PC browsers.

Yesterday I’ve copied one of my old documents to Evernote and found, that links in the document are broken and cause error like the following:

404. That’s an error.
The requested URL /http%3A%2F%2Fstackoverflow.com%2Fquestions%2F3110456%2Fpostsharp-build-targets-not-running-when-using-debug-configuration was not found on this server. That’s all we know.

So Google Drive stores URL in encoded format, which making harder to copy texts with links. It’s easy to fix, but annoying. Hopefully I would not need to copy many files from Google Drive.v

Enterprise Instrumentation: The ‘sessionName’ parameter of value ‘TraceSession’ is not valid

We are still using Enterprise Instrumentation(that was created during .Net 1.1 time)
In new Server 2008 environment and IIS 7 we have the following errors:
The ‘sessionName’ parameter of value ‘TraceSession’ is not valid. A trace session of this name does not exist in the TraceSessions configuration file for Windows Trace Session Manager service. Ensure that a session of this name exists in the TraceSessions configuration file and that the Windows Trace Session Manager service is started.
   at Microsoft.EnterpriseInstrumentation.EventSinks.TraceEventSink..ctor(IDictionary parameters, EventSource eventSource)
   — End of inner exception stack trace —
   at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at Microsoft.EnterpriseInstrumentation.EventSinks.EventSink.CreateNewEventSinks(DataRow[] eventSinkRows, EventSource eventSource)

I’ve seen the same errors on development Win7 machines when using IIS. It seems not a problem on Cassini.

I’ve checked ,that Windows Trace Session Manager Service has started and 
The file C:Program Files (x86)Microsoft Enterprise InstrumentationBinTrace ServiceTraceSessions.config has corresponding entry
<?xml version=”1.0″ encoding=”utf-8″ ?>
<configuration xmlns=”http://www.microsoft.com/schema/EnterpriseInstrumentation/v1/TraceSessions.xsd”>
                <defaultParameters minBuffers=”4″ maxFileSize=”10″ maxBuffers=”25″ bufferSize=”20″ logFileMode=”sequential” flushTimer=”3″ />
                                 <session name=”TraceSession” enabled=”false” fileName=”C:Program Files (x86)Microsoft Enterprise InstrumentationBinTrace ServiceLogsTraceLog.log” />
The errors still continue, but I was able to disable  the parameter in  eventSink configuration

   <eventSink name= traceSink description= Outputs events to the Windows Event Trace. type =Microsoft.EnterpriseInstrumentation.EventSinks.TraceEventSink >
                <!– MNF disabled parameter to  avoid error “The ‘sessionName’ parameter of value ‘TraceSession’ is not valid” 
                     < parameter name =sessionName  value =TraceSession  />
    </ eventSink>

One day I wish to replace all EnterpriseInstrumentation calls with NLog.

Eager Loading more than 1 table in LinqtoSql

When I’ve tried in Linq2Sql to load table with 2 child tables, I’ve noticed, that multiple SQLs are generated. I’ve found that  it is
a known issue, if you try to specify more than one to pre-load it just  picks which one to pre-load and which others to leave deferred (simply ignoring those LoadWith hints)
There are more explanations in 
The reason the relationship in your blog post above is generating multiple queries is that you have two (1:n) relationship (Customers->Orders) and (Orders->OrderDetails). If you just had one (1:n) relationship (Customer->Orders) or (Orders->OrderDetails) LINQ to SQL would optimize and grab it in one query (using a JOIN). 

The alternative -to use SQL and POCO classes-see http://stackoverflow.com/questions/238504/linq-to-sql-loading-child-entities-without-using-dataloadoptions?rq=1

Fortunately the problem is not applicable to Entity Framework, that we want to use in future development instead of Linq2Sql
Product firstProduct =  db.Product.Include("OrderDetail").Include("Supplier").First();


Do NOT Change “Copy Local” project references to false, unless understand subsequences.

To optimize performance of visual studio build I’ve found multiple recommendations to change CopyLocal property for dependent dlls to false,
  1. e.g. From http://stackoverflow.com/questions/690033/best-practices-for-large-solutions-in-visual-studio-2008 
  • CopyLocal? For sure turn this off
  • Always set the Copy Local property to false and enforce this via a custom msbuild step
  • My advice is to always set ‘Copy Local’ to false

Some time ago we’ve tried to change the setting to false, and found that it causes problem for deployment of top-level projects.

Recently I’ve followed the suggestion and changed the settings for middle-level projects. It didn’t cause immediate issues, but I was warned by Readify consultant colin savage about possible errors during deployments.

I haven’t undone the changes immediately and we found a few issues during testing.

There are many scenarios, when you need to have Copy Local’ left to True.

The concerns are highlighted in some StackOverflow answers, but they have small number of votes.The concerns are highlighted in some StackOverflow answers, but they have small number of votes.


Top-level projects:  set copy local = true.

First of all, it doesn’t work correctly for top-level projects, i.e. executables or web sites.
As pointed in the answer http://stackoverflow.com/a/6529461/52277
  • for all the references in the one at the top set copy local = true.
If you set ‘ Copy Local = false’, VS will, unless you tell it otherwise, place each assembly alone in its own .binDebugdirectory. Because of this, you will need to configure VS to place assemblies together in the same directory. To do so, for each VS project, go to VS > Project Properties > Build tab > Output path, and set the Ouput path to ..binDebugfor debug configuration, and ..binRelease for release configuration.

Second-level  dependencies:  set copy local = true.


Another example when copylocal =false fails on run-time, is when top level assembly doesn’t directly referenced one of indirect dependencies.
E..g. Top-level assembly A has reference to assembly B with copylocal =true, but assembly B has reference to assembly C with copylocal =false. Most likely assembly C will be missing on runtime and will cause errors 

Copy local is important for deployment scenarios and tools. As a general rule you should use CopyLocal=True

and http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1

Unfortunately there are some quirks and CopyLocal won’t necessary work as expected for assembly references in secondary assemblies structured as shown below.

  • MainApp.exe
  • MyLibrary.dll
  • ThirdPartyLibrary.dll (if in the GAC CopyLocal won’t copy to MainApp bin folder)

This makes xcopy deployments difficult . 

Reflection called DLLs  dependencies:  set copy local = true.
E.g user can see error “ISystem.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.”

The fix for the issue is recommended in http://stackoverflow.com/a/6200173/52277

“I solved this issue by setting the Copy Local attribute of my project’s references to true.”


In general, the problems with investigation of deployment issues may overweight the benefits of reduced build time.
Setting the Copy Local to false without considering deployment issues is not a good idea.