문제

I'm trying to do a quick and dirty deployment of a project. I thought it would be easy to run my process, use some tool to grab a list of all loaded files (DLLs) and use that list to create a copy file list for my test deployment.

Thought about using filemon but there is a lot of noise in there. Its a .net project.

Thanks.

도움이 되었습니까?

해결책

You should be able to use .NET's Reflection to analyze your application AppDomain(s) and dump a list of loaded assemblies and locations.

var loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in loadedAssemblies)
{
    Console.WriteLine(assembly.GetName().Name);
    Console.WriteLine(assembly.Location);
}

다른 팁

Process Explorer?

Check out AppDomain.GetAssemblies

For Each Ass As Reflection.Assembly In CurrentDomain.GetAssemblies()
    Console.WriteLine(Ass.ToString())
Next

This is answered in another question already.

The gist of it is use current appdomain to get a list of assemblies and loop through their loader location.

If I have understood your question, to do a fast deployment you can set in all the references of your project but the Framework ones the setting "Copy Local" to true.

This way when you build your application you will have all the needed DLLs at your output directory (well, almost all, references needed by your references won't be copied automatically, so it's best to add them as a local reference too).

Hope this helps. If not, just say why, I will try to continue on this.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top