assemblies

Why can't strongly named assemblies use assemblies that aren't signed?

三世轮回 提交于 2019-12-01 18:02:11
问题 To sign an assembly A you have to make sure all assemblies B, C, D that are used by A are signed, and then all assemblies that are used by B, C, D, and so on. I don't understand what's the security benefit of this. I think it's supposed to prevent tampering, but assembly A is allowed to open any file, and these can be tampered. The same goes for an external webserver. Also, it's too easy to sign an assembly with a .snk file that you make public, sidestepping the requirement. 回答1: The point is

Automatically embed multiple icons in a .NET Executable

元气小坏坏 提交于 2019-12-01 17:57:09
I basically have the same issue as this question: Embed multiple icons in WPF EXE My .NET 2.0 WinForms application currently has this when you click "Change Icon" in explorer: (source: richard-slater.co.uk ) What I would like to see, and with some hacking about as suggested by the above article I get this: (source: richard-slater.co.uk ) However the process of getting there all of the version information for the assembly is lost. I need to maintain the Version Information in the assembly as my auto-update process relies on this to identify the installed version of the application. I also build

Maven Error reading assemblies: No assembly descriptors found

為{幸葍}努か 提交于 2019-12-01 17:49:47
问题 Following this Guide I ran the command mvn assembly:assembly and got the Build Failure of Error reading assemblies: No assembly descriptors found. I've looked at numerous questions on this, but to no avail. From this post, I created a .xml with this inside: <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http:/

Why can't strongly named assemblies use assemblies that aren't signed?

喜你入骨 提交于 2019-12-01 17:48:16
To sign an assembly A you have to make sure all assemblies B, C, D that are used by A are signed, and then all assemblies that are used by B, C, D, and so on. I don't understand what's the security benefit of this. I think it's supposed to prevent tampering, but assembly A is allowed to open any file, and these can be tampered. The same goes for an external webserver. Also, it's too easy to sign an assembly with a .snk file that you make public, sidestepping the requirement. The point is that otherwise you could replace assembly B/C/D with a different (hacked) one, and A would never notice; it

Why exactly does regasm warn me about signing with a strong name?

♀尐吖头ヾ 提交于 2019-12-01 17:46:01
If I want to make a .NET assembly usable as a COM server I have to add a set of attributes and then use regasm to register it as a COM server. If the assembly is not signed with a strong name regasm when run with /codebase key shows a RA0000 warning saying that the assembly could interfere with other assemblies on the same computer and I should sign it with a strong name, but registration succeeds and it even works just fine. AFAIK strong names are intended to prevent so-called DLL hell. But COM was also meant to prevent DLL hell. If I change any interface exposed to COM I must either change

Can I declare a variable of Type<T> without specifying T at compile time?

℡╲_俬逩灬. 提交于 2019-12-01 17:24:39
问题 How do I Load the class "MyContent" dynamically ? I have 1 interface<T> , 1 abstract generic class<T> and 1 class. Check my code out: public interface IMyObjectInterface{ } public abstract MyAbstractObject : IMyObjectInterface{ } public class MyObject : MyAbstractObject{ } public interface IMyContentInterface<T> where T : MyAbstractObject { void MyMethod(); } public abstract MyAbstractContent<T>, IMyContentInterface<T> where T : MyAbstractObject { public abstract void MyMethod(); } public

The Order of Assemblies Being Loaded

人走茶凉 提交于 2019-12-01 17:14:15
I have a few .Net assemblies, same version, same file name, but located at different location: Program folder C:\Windows C:\Windows\system32 GAC Now, which location's assembly will be loaded first? mfawzymkh .Net assemblies has different search order than regular windows .dll. GAC will be checked the first thing ONLY if the assembly is strongly named signed. If the assembly is not in the gac / not strong name signed , the local folder is checked after that. That is the end of the .net assembly search order, 1,2 and 3 above are not checked. you can change where the .net looks for assembly by

How do I report progress on loading assemblies into the Current AppDomain in .Net on a splash screen?

◇◆丶佛笑我妖孽 提交于 2019-12-01 17:11:42
问题 I'm having a little difficulty in displaying the progress of assemblies being loaded into the AppDomain.CurrentDomain. What I want to do is display a splash screen that has a progress bar, I want to be able to update this Progress bar as each assembly is loaded into memory in the AppDomain. This way users will have a visual indicator as to the progress of the application launch. I don't care that assemblies are loaded before the Splash Screen is rendered which is actually just a standard WPF

InternalsVisibleTo attribute isn't working

最后都变了- 提交于 2019-12-01 16:43:33
Before I go on I did go through this InternalsVisibleTo attribute ain’t workin'! Hence the title Okay so I had a working version of my project that was using something like the following. [assembly: InternalsVisibleTo("Stuff.Test.Support, PublicKey="0024000004800000940000000302000000240000525341310004000001000100d158cd56401c3d90b52ca1a5f273d608c3ce12aaa21385b0f4ad7dc1b747e45ee1f1771c104c52cb4da1b587ae38b6d36fa1d8e8f14003c42f700bc62ef2ec04b231c5d930e4bc3691aa1ef7b6713926316d4be1165ede086e94190b44edd4ad0d024230ae6eb9deb728b00d71d1d468b20a9bb78f242bd6c41e640c2e5c0cd5")] In the Properties

How to set “Specific Version” property for project references in Visual Studio

余生颓废 提交于 2019-12-01 16:31:37
I have got a Visual Studio Solution containing several projects and have set up the references between the projects as project references. When a reference to an assembly is added, the references' properties contain a setting for Specific Version = True|False This property is missing for project references. How can it be set? I'd like my solution to load any available assembly (no matter what version) in the bin folder. I've had a problem when a workflow instance (Workflow Foundation) was deserialized and the dependencies were updated meanwhile. I think the problem is that what you are asking