Robocopy Destination Folder Became System Hidden


If you are using robocopy to copy from a root drive folder, u may run into a few issues. 

  1. It tries to copy at least 2 system hidden folders:
    1. Recycle bin on the source drive.
    2. System Volume Information
  2. Destination folder becomes system hidden.


   1: rem /E -- copy all folders recursively on E:

   2: rem /XD -- skip 2 system folders: Recyle Bin and System Volume Information

   3: rem /MIR -- mirror delete on destination if source does not have that file any more

   4: robocopy E: "F:\Backup\xxxx" /XD e:\$RECYCLE.BIN "e:\System Volume Information" /E /MIR


   6: rem unhide and don't make the dest folder a system folder

   7: attrib -s -a -h "F:\Backup\xxxx"

   8: pause

Visual Studio 2010 & 2012 Sharing/Using Same TFS Workspace

First, if you want to use VS 2010 with Team Foundation Service, you need to install a hot fix.

Note 1: you need to install VS 2010 SP1 first.

Note 2: Regular Windows Update won’t pick this hotfix up.  You need to manually install it.

If you already are using a workspace with VS2012 with TFS and you want to use the same workspace for VS 2010:

  1. Edit your VS2012 workspace and change from Local Workspace to Server Workspace.
  2. In VS 2010, you should now be able to see the workspace used by VS 2012.  Select that workspace to use.

MetadataException: Unable to load the specified metadata resource

This exception occurs when the project cannot use the connection string to locate the 3 parts of EDMX: csdl, msl, and ssdl.

Troubleshooting steps:

  1. Find the right configuration file.  Review the configuration file of the executing assembly.  For example, if you are running a unit test project which references another project with edmx, you should look at the unit test project’s app.config file.  You should add an app.config file to your unit test project if necessary.
  2. Verify that your executing project (i.e. unit test project) references an assembly containing the 3 parts of EDMX.  This is especially true if you are doing POCO.  It is the project that you added the item “ADO.NET Entity Data Model”.  To verify, use a 3rd party tool (e.g. ILSpy) to examine the assembly inside; you should see the resources containing the 3 parts of EDMX.  image Note: Your project may compile fine without it, but you need it at run time.
  3. Make sure you have a reference to the entity framework dll.
  4. Try different ways of configuring the connection string:
      The standard/default connection is probably not working for you or else you won’t be reading this. 

         1: <connectionStrings>

         2:   <add name="xxxxEntities" connectionString="metadata=

         3:     res://*/Modelxxxx.csdl|

         4:     res://*/Modelxxxx.ssdl|

         5:     res://*/Modelxxxx.msl;

         6:     provider=System.Data.SqlClient;provider connection string=&quot;data source=localhost;initial catalog=xxxxDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

         7: </connectionStrings>

    1. The safest way is to specify the fully qualified assembly name of your EMDX project in your connection string. 
         1: <connectionStrings>

         2:   <add name="xxxxEntities" 

         3:     connectionString="metadata=

         4:         res://LA.Infrastructure.xxxxAssembly, Version=, Culture=neutral, PublicKeyToken=null/Modelxxxx.csdl|

         5:         res://LA.Infrastructure.xxxxAssembly, Version=, Culture=neutral, PublicKeyToken=null/Modelxxxx.ssdl|

         6:         res://LA.Infrastructure.xxxxAssembly, Version=, Culture=neutral, PublicKeyToken=null/Modelxxx.msl;

         7:         provider=System.Data.SqlClient;provider connection string=&quot;data source=localhost;initial catalog=xxxxDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

         8: </connectionStrings>

    2. The last resort is use an asterisk.  This may get you past the error “unable to load the specified meta resource.”  However, you may get some other error “The entity type is not part of the model for the current context” when you access the entity object within the model.
         1: <connectionStrings>

         2:   <add name="xxxxEntities" connectionString="metadata=

         3:     res://*/;provider=System.Data.SqlClient;provider connection string=&quot;data source=localhost;initial catalog=WinDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

         4: </connectionStrings>


If you have the edmx in one project and the in another project, then you probably need to use approach A for your unit testing project’s connection string to point to the project with .edmx file.

If you have both edmx and in the same project, then your unit testing project’s default connection string should work.


Add a VS2012 Project to TFS


You have a solution already added to the source control TFS.  Then you start renaming some of the projects within the solution.


Then you get error saying that the binding of the project is invalid, and you don’t see the project listed in Source Control Explorer.  You also notice that the project does not have a source control  (i.e. blue lock icon) next to it in Solution Explorer. 

You try to add the project via Solution Explorer, but there is nothing like “Add project to source control”.  You try unbind and then bind the project with no success.


  1. Use Source Control Explorer
  2. Right-click on the solution folder and select “Add Items to Folder…”
  3. Select the folders of the projects you want to add to TFS and click Finish.
  4. Remember to Check In to commit the changes.

“The remote certificate is invalid according to the validation procedure.”

An .NET app threw the above error when it tried connect to a FTP server over TLS/SSL.

In this case, the error was caused by the SSL certificate.  The SSL certificate was a Multiple Domain (UCC) SSL Certificate.  It was issued for at first.  When ftp1 server was setup, I had to add a SAN (Subject Alternative Names). 

I made the mistake of entering “ftp1” instead of a fully qualified domain name “”.  That triggered the error in the Title.

The solution is simply to drop the “ftp1” and add “” SAN, reissue the SSL, and install the SSL onto ftp1 server.

Note: ftp2 server also needs to reinstall the newly issued SSL certificate since the old SSL certificate will expire in 24 hours.