file-properties

How can i see the assembly version of a .NET assembly in Windows Vista and newer (WIndows 7, 2008)?

时光怂恿深爱的人放手 提交于 2019-12-06 18:11:17
问题 In windows 2003 and windows XP you could right click on an assembly (.dll) go to properties, click on the version tab and then you would see 3 different version numbers: Assembly version, file version and product version. If you take that same file and look at its properties in windows 2008, you will only see file version and product version. Is there a way to see the assembly version of a .NET assembly in windows vista and newer (without third part tools)? 回答1: No. Not from explorer. It is

Read extended image properties in c#

淺唱寂寞╮ 提交于 2019-12-05 05:18:32
I would like to find the height/width of an image on disk without opening it, if possible (for performance reasons). The Windows properties pane for images contains information like width, height, bit depth, etc., which leads me to believe that it is storing metadata on the file somewhere. How can I access this information? Zed There are some stackoverflow questions on how to read the EXIF information from images, such as: How to get the EXIF data from a file using C# Use System.Drawing.Image class. Image img = Image.FromFile(fileName); ImageFormat format = img.RawFormat; Console.WriteLine(

How can i see the assembly version of a .NET assembly in Windows Vista and newer (WIndows 7, 2008)?

时光怂恿深爱的人放手 提交于 2019-12-04 22:16:34
In windows 2003 and windows XP you could right click on an assembly (.dll) go to properties, click on the version tab and then you would see 3 different version numbers: Assembly version, file version and product version. If you take that same file and look at its properties in windows 2008, you will only see file version and product version. Is there a way to see the assembly version of a .NET assembly in windows vista and newer (without third part tools)? Gerald Davis No. Not from explorer. It is an intentional move by Microsoft (although I dislike it). You can from powershell though:

Getting specific file attributes

旧时模样 提交于 2019-12-04 09:32:40
问题 I've got a simple WCF service that lets clients/consumers upload image, audio or video files to it. After the upload, the service is supposed to analyze the file and somehow retrieve the following attributes: Image: width, height, date taken, program used Audio: runtime, artist, album, genre, bitrate, publication year Video: runtime, width, height, frames/sec, video bitrate, audio bitrate Apparently Windows can get and display these attributes pretty easily, but how do I do it in C#? 回答1:

Getting specific file attributes

让人想犯罪 __ 提交于 2019-12-03 03:16:44
I've got a simple WCF service that lets clients/consumers upload image, audio or video files to it. After the upload, the service is supposed to analyze the file and somehow retrieve the following attributes: Image: width, height, date taken, program used Audio: runtime, artist, album, genre, bitrate, publication year Video: runtime, width, height, frames/sec, video bitrate, audio bitrate Apparently Windows can get and display these attributes pretty easily, but how do I do it in C#? Khepri Courtesty of this thread. I've verified this gets all file attributes including the extended attributes.

Is it possible to set/edit a file extended properties with Windows API Code Pack?

余生颓废 提交于 2019-12-01 17:15:17
I'd like to know if it's possible to set/edit a file extended properties (Explorer: Right-click > Properties > Details) using the Windows API Code Pack. var shellFile = Microsoft.WindowsAPICodePack.Shell.ShellObject.FromParsingName(filePath); var artistName = shellFile.Properties.GetProperty(SystemProperties.System.Music.DisplayArtist).ValueAsObject.ToString(); var duration = TimeSpan.FromMilliseconds(Convert.ToDouble(shellFile.Properties.GetProperty(SystemProperties.System.Media.Duration).ValueAsObject) * 0.0001); I use these few lines to get the properties I want, but I don't know how to

Is it possible to set/edit a file extended properties with Windows API Code Pack?

試著忘記壹切 提交于 2019-12-01 16:20:50
问题 I'd like to know if it's possible to set/edit a file extended properties (Explorer: Right-click > Properties > Details) using the Windows API Code Pack. var shellFile = Microsoft.WindowsAPICodePack.Shell.ShellObject.FromParsingName(filePath); var artistName = shellFile.Properties.GetProperty(SystemProperties.System.Music.DisplayArtist).ValueAsObject.ToString(); var duration = TimeSpan.FromMilliseconds(Convert.ToDouble(shellFile.Properties.GetProperty(SystemProperties.System.Media.Duration)

How can I get the assembly last modified date?

我的未来我决定 提交于 2019-11-28 21:07:00
I want to render (for internal debugging/info) the last modified date of an assembly, so I'll know when a certain website was deployed. Is it possible to get it through reflection? I get the version like this: Assembly.GetExecutingAssembly().GetName().Version.ToString(); I'm looking for something similar -- I don't want to open the physical file, get its properties, or something like that, as I'll be rendering it in the master page, and don't want that kind of overhead. Clyde I'll second pYrania's answer: System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();

How can I get the assembly last modified date?

非 Y 不嫁゛ 提交于 2019-11-27 20:51:01
问题 I want to render (for internal debugging/info) the last modified date of an assembly, so I'll know when a certain website was deployed. Is it possible to get it through reflection? I get the version like this: Assembly.GetExecutingAssembly().GetName().Version.ToString(); I'm looking for something similar -- I don't want to open the physical file, get its properties, or something like that, as I'll be rendering it in the master page, and don't want that kind of overhead. 回答1: I'll second

How do you check a file type when there is no extension in c#

≯℡__Kan透↙ 提交于 2019-11-27 07:11:21
问题 How do you check a file type when there is no extension in c# For instance, I have files with no extension, that are either .mp4 or .flv format (just no extension). I plan on converting these video files to audio files however I would like to determine the file type before I start converting it. Is there a way to do this in C#? I was thinking that maybe I could just rename the file to name.mp4, then perform some task on the file that would either A) succeed, meaning that the file was indeed