Here's an interesting issue that has come up recently. As you may already know, .NET provides several layers of security for .NET applications. One of these layers is very similar to the Zone concept in IE. When an assembly is loaded into .NET, where the file came from is very important. If it's loaded from the local disk, it's assumed to be fully trusted. However, if it comes from the network (even a mapped drive), it isn't.
Here is an important piece of information from MSDN regarding AppDomains. Note that the ApplicationBase is simply the home directory for the AppDomain.
"The ApplicationBase property can influence which permissions are granted to an AppDomain. For example, an Appdomain originating from the local machine normally receives full trust based on its location of origin. However, if the ApplicationBase of that AppDomain is set to the full name of an intranet directory, the ApplicationBase setting will restrict the AppDomain permission to a LocalIntranet grant even though the AppDomain actually originates from the local machine."
You're probably saying "Wait a minute. You were talking about assembly locations and now you are talking about AppDomains...what gives?"
Well, of course, it is regarding LabVIEW and .NET.
If you recall, in LV version 7.x, we create an AppDomain for each top level VI that runs (see all my earlier posts on this topic). In Constellation, that's changed to one AppDomain per project. In either case, the ApplicationBase setting for the AppDomain is tied to a file (the directory of the VI in 7.x, the directory of the project in Constellation - or LabVIEW's install directory if you haven't yet saved a project).
So, what would happen if said VI/Project was on a network drive? Not much. Meaning, of course, not much would run. You're application probably wouldn't make it very far because LabVIEW's .NET code needs full trust.
I should also point out that this is the same problem you are going to have if your assembly is on a network drive, even if the VI/Project is local.
Solution?
But of course...
There is a handy little tool that ships with the .NET framework called caspol.exe. This creates security policy settings that tell .NET to consider a given network drive to have full trust. For example, imagine that your code is on the Z: drive, which is a network mapped drive. You can add it to the trusted list by the following command:
caspol -q -machine -addgroup 1 -url
file://z:/* FullTrust -name "Z Drive"
Now everything should work fine.