assemblies

How can I view MSIL / CIL generated by C# compiler? Why is it called assembly?

こ雲淡風輕ζ 提交于 2019-11-27 02:39:06
I'm new to .NET C# programming. I'm following few books. It is said that instead of compiling it directly to binary code (Native code). High level code is converted into intermediate language (called MSIL aka CIL). But when I compile, I get an exe/Dll file. Is this MSIL/CIL containted in these exe/dll file? I want to see that intermediate language code. Just to get feel of its existence. How to view it? They are calling this exe/dll file an assembly . Are they using this "fancy word" just to differentiate these from the exe/dll files that contain binary code (native code)? Yes it is, more

Strange Error - CS0012: The type x is defined in an assembly that is not referenced

霸气de小男生 提交于 2019-11-27 02:31:06
问题 The type 'x' is defined in an assembly that is not referenced. You must add a reference to assembly 'abc123'. I have a .NET 2.0 web application that references my assembly 'abc123'. The assembly exists in the GAC and I've verified that it is the correct(same) version. The rest of application has no issues except for one .aspx page. The page in question has a repeater that displays a user control as one of its "fields". Upon binding a list of type y to the repeater I pass the user control a

How to extract an assembly from the GAC?

為{幸葍}努か 提交于 2019-11-27 02:25:28
There is a package I have to deal with which installs assemblies straight into the GAC (e.g. somewhere deep in %windows%/assembly). How do I exorcise the actual assembly (the DLL) from the GAC into the normal file system? Thanks. Andrew Hare I used the advice from this article to get an assembly from the GAC. Get DLL Out of The GAC DLLs once deployed in GAC (normally located at c:\windows\assembly) can’t be viewed or used as a normal DLL file. They can’t be directly referenced from VS project. Developers usually keep a copy of the original DLL file and refer to it in the project at development

How can I create a custom Property for my assembly?

只谈情不闲聊 提交于 2019-11-27 02:21:15
问题 How can I create a custom property for my .Net assembly which would then be visible under the Details tab in Windows explorer? Something to sit parallel with "File Description", "Type", "Product Version"... etc Update: To quote my comment to Lars ... "Whilst I would have liked to do this from within Visual studio, that is certainly not my priority. Actually I hope to integrate any solution into an existing nant build process. So affecting the assemblies post compile is entirely acceptable.

Is it possible to execute a .NET dll without an exe to load it?

不问归期 提交于 2019-11-27 02:10:38
问题 I'm curious if there's a way to execute a static .DLL method in a new process without having to create an .EXE for it? AFAIK, this isn't possible with native Win32/64 DLLs. How about .NET DLL assemblies? UPDATE : I forgot to mention I'm primarily interested in doing this programmatically (from C# code, to be specific). Thanks! CONCLUSION : Although no one "dared" to spell it out, the answers all seem to lean towards 'no'. One needs to start a process through one of the conventional ways (EXE,

A procedure imported by {myassembly} could not be loaded

旧巷老猫 提交于 2019-11-27 02:06:29
问题 when running a prorgam, it seems that I am missing a library, when I launch the output of my project I get an exception at startup. A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll An unhandled exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll Additional information: A procedure imported by 'my assembly, Version=xx.1.1.0, Culture=neutral, PublicKeyToken=7292581204d9e04a' could not be loaded. 'ScriptX.vshost.exe' (Managed): Loaded

How does visual studio determine what to copy to the output directory with multi-project solutions?

半世苍凉 提交于 2019-11-27 02:04:42
问题 Let's say we have a solution with the following structure: Project.DAL - Data access layer, depends on a lower-level library, e.g. Oracle.DataAccess w/copy local = true Project.BLL - Business logic layer, references Project.DAL as project Project.UI - UI layer, compiles to executable, references Project.BLL, default project When Project.UI is compiled, VS is smart enough to copy Project.DAL.dll to the output directory, but it's not smart enough to figure out that I wanted Oracle.DataAccess to

Automatic assembly version number management in VS2008

那年仲夏 提交于 2019-11-27 01:54:36
问题 I have a VS2008 project written in c# with a number of assemblies. I'd like to have a simple way of managing the version numbers between all of the different assemblies and a way to automatically increment the build number and have that saved into the version number of each assembly. I'm guessing that this is a problem with most projects so presumably it has been solved before? Any suggestions for how I can simplify management of my project's version resources? 回答1: I use a .cs file on

WPF assembly reference missing - project still building

故事扮演 提交于 2019-11-27 01:39:16
问题 I am trying to use the Dynamic Data Display library for WPF in my solution. I added a reference to DynamicDataDisplay.dll in my project. I also added a namespace in the .xaml like this: xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0" Intellisense is not helping me when I try to add a element from the Dynamic Data Display library. When I type something like this in my .xaml: <d3:ChartPlotter></d3:ChartPlotter> Visual studio will mark it as an error with some text like: The type

Secure C# Assemblies from unauthorized Callers

为君一笑 提交于 2019-11-27 01:35:37
问题 Is there any way to secure your assembly down to the class/property & class/method level to prevent the using/calling of them from another assembly that isn't signed by our company? I would like to do this without any requirements on strong naming (like using StrongNameIdentityPermission) and stick with how an assembly is signed. I really do not want to resort to using the InternalsVisibleTo attribute as that is not maintainable in a ever changing software ecosystem. For example: Scenario One