我如何能够在C#中列举全球艾滋病理事会现有的所有集会?
实际上,我正面临一个 code编的问题——称为Telerik。 Web.UI.dll被提及并用于项目,而这种特别的DLLL并不出现在BIN的夹中。 申请在服务器上课以罚款,但在我的机器上,显然汇编者正在犯错误。 外部开发商坚持说,它不是设在全球运输公司服务器上,而是现在的。 现在,我需要检查这部法律是否在东南非共同市场注册。
希望将受到赞赏。
良好日子;
我如何能够在C#中列举全球艾滋病理事会现有的所有集会?
实际上,我正面临一个 code编的问题——称为Telerik。 Web.UI.dll被提及并用于项目,而这种特别的DLLL并不出现在BIN的夹中。 申请在服务器上课以罚款,但在我的机器上,显然汇编者正在犯错误。 外部开发商坚持说,它不是设在全球运输公司服务器上,而是现在的。 现在,我需要检查这部法律是否在东南非共同市场注册。
希望将受到赞赏。
良好日子;
如果您对服务器的利用有限,这项工作可以:
// List of all the different types of GAC folders for both 32bit and 64bit
// environments.
List<string> gacFolders = new List<string>() {
"GAC", "GAC_32", "GAC_64", "GAC_MSIL",
"NativeImages_v2.0.50727_32",
"NativeImages_v2.0.50727_64",
"NativeImages_v4.0.30319_32",
"NativeImages_v4.0.30319_64"
};
foreach (string folder in gacFolders)
{
string path = Path.Combine(
Environment.ExpandEnvironmentVariables(@"%systemroot%assembly"),
folder);
if(Directory.Exists(path))
{
Response.Write("<hr/>" + folder + "<hr/>");
string[] assemblyFolders = Directory.GetDirectories(path);
foreach (string assemblyFolder in assemblyFolders)
{
Response.Write(assemblyFolder + "<br/>");
}
}
}
它基本上列举了全球大气中原子弹夹。 该网络在共享托管服务方面开展工作,可以为你的主办环境工作。
可以通过在每届议会中更深入地列举数字,以找出数字和公共钥匙。
如果在C#中出现这种具体损失,你就不需要写一些东西。 您可使用gacutil.exe,在指挥线上可选择/l,列出GAC的内容。
This code is known to work with .NET 1.1 and 2.0. Please note that the DLL fusion.dll is different in 1.1 and 2.0. So if you have both frameworks installed, make sure to point the code to the right DLL. Otherwise most API-calls will fail. The default implementation uses the one found in the WINDOWS directory.
如果它带有便宜的ASP。 互联网网站和组件没有在网站的双倍夹或服务器自动取款机上(网络中没有任何鱼类),或许该网址是某种次点,其次点包含双倍(或网络中的一些鱼类),因为次点/夹继承了网站。
现在,如果你有一个环境,档案被正确地装上(并且与你一样正确),你就能够提出。 NET 。 dll is come from and show that rather, for example:
Assembly a = Assembly.Load("Microsoft.VisualStudio.Shell, Version=2.0.0.0, "
+ "PublicKeyToken=b03f5f7f11d50a3a, Culture=Neutral");
Console.WriteLine(a.Location);
Will load an assembly and display its on-disk location, my output is:
C:WindowsassemblyGAC_MSILMicrosoft.VisualStudio.Shell2.0.0.0__b03f5f7f11d50a3aMicrosoft.VisualStudio.Shell.dll
如果在“C:Corassembly”下,你会知道它在GAC。
如果没有大会,你也可以这样做。 如果你已经提到大会,你可以列举装入目前顶部和刚印刷(或置于字面控制或反应)的集会。 书写等......他们的居住性质是什么。
Edit: The code for that looks something like this:
foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
{
Console.WriteLine(a.GetName().FullName);
Console.WriteLine(a.Location);
Console.WriteLine();
}
Edit: On a full trust environment, the following code (console app) will enumerate the GAC and write out each assembly, it should be easy to modify it into an ASP.NET app, but I m not sure if it will work in an environment that is less than full trust (just guessing here, you might get lucky):
static void ProcessFile(string file)
{
try
{
Assembly a = Assembly.LoadFile(file);
Console.WriteLine(a.GetName().FullName);
}
catch { /* do nothing */ }
}
static void ProcessFolder(string folder)
{
foreach (string file in Directory.GetFiles(folder))
{
ProcessFile(file);
}
foreach (string subFolder in Directory.GetDirectories(folder))
{
ProcessFolder(subFolder);
}
}
static void Main(string[] args)
{
ProcessFolder(@"C:WindowsAssembly");
}
a 简单的方法,在名录中列举批号文件
public static string[] GetGlobalAssemblyCacheFiles(string path)
{
List<string> files = new List<string>();
DirectoryInfo di = new DirectoryInfo(path);
foreach (FileInfo fi in di.GetFiles("*.dll"))
{
files.Add(fi.FullName);
}
foreach (DirectoryInfo diChild in di.GetDirectories())
{
var files2 = GetGlobalAssemblyCacheFiles(diChild.FullName);
files.AddRange(files2);
}
return files.ToArray();
}
查阅所有档案
string gacPath = Environment.GetFolderPath(System.Environment.SpecialFolder.Windows) + "\assembly";
var files = GetGlobalAssemblyCacheFiles(gacPath);
如果你需要装上每组装货,那么你就有一个不同时间版本的例外情况。 因此,你可以装上。 大会:只思考如何重新当选。 然后, 国会在贵岛不装上字,也不例外。
图一还可能在我的林克解决办法中投下(如果你只是找一个单一档案,而不想通过每个档案加以列举)
查阅档案的职能:
public static IEnumerable<string> FindFiles (string path, string filter = "", int depth = int.MaxValue) {
DirectoryInfo di = new DirectoryInfo(path);
IEnumerable<string> results = (! string.IsNullOrEmpty(filter) ? di.GetFiles(filter) : di.GetFiles()).Select(f => f.FullName);
if (depth > 0) {
results = results.Concat(di.GetDirectories().SelectMany(d => FindFiles(d.FullName, filter, depth - 1)));
}
return results;
}
并且呼吁(即拥有环境)。 专著。 Windows so使用环境。 专著。 相反,系统
string path = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\..\assembly";
foreach (string s in FindFiles(path, "*.dll")) {
Console.WriteLine(s);
}
此外,作为“FYI”这一方法,该方法列出了整个全球大气中的温室气体,并且你可能会发现在波纹和温带中出现重复的DLs,而Tmp则用于安装,而温度则用于无损。