.net-assembly

How to identify if a GAC assembly is loading

断了今生、忘了曾经 提交于 2019-12-20 04:23:35
问题 I have installed Visual Studio 2011 beta, and have found that a website I was working on has since stopped working. It has been suggested that there is an MVC or Razor assembly from the GAC which is loading and taking over. How would I check this? 回答1: Run the application in Debug mode and watch the Output window in Visual Studio. It will list every assembly as it is loaded, you will recognize GAC assemblies easily by its full file path. 回答2: Just of interest let's do it i runtime. The idea

Table of Contents for PDF/Printed Report in SSRS

前提是你 提交于 2019-12-20 04:16:28
问题 Here's what I do know: I know that document maps and bookmarks can be utilized on screen but not in a pdf. SSRS does not have an out of the box ability to generate a printed Table of Contents with Page Numbers to a pdf. I know that a TOC can be generated by exporting the document map to Word. This approach will not work for my situation. Global variables can store page numbers, but they can't be utilized within the report body, only headers and footers. The closest thing I can find is a

Calling an x64 assembly via COM from a 32 bit App

被刻印的时光 ゝ 提交于 2019-12-19 19:04:21
问题 Short question : is it possible (on an x64 OS of course) ? If not, why exactly ? I have developed a c# plugin dll for excel 32. When compiled in x86 it works fine. When compiled in x64 the COM call fails. Do I need a 64 bit version of excel ? I thought COM was agnostic of compiling architecture and made communication possible between dlls developed in different technologies and having different architectures, but I guess the latter is wrong. I guess an x64 bit dll can obviously not be called

Calling an x64 assembly via COM from a 32 bit App

六月ゝ 毕业季﹏ 提交于 2019-12-19 19:03:12
问题 Short question : is it possible (on an x64 OS of course) ? If not, why exactly ? I have developed a c# plugin dll for excel 32. When compiled in x86 it works fine. When compiled in x64 the COM call fails. Do I need a 64 bit version of excel ? I thought COM was agnostic of compiling architecture and made communication possible between dlls developed in different technologies and having different architectures, but I guess the latter is wrong. I guess an x64 bit dll can obviously not be called

How to add reference to assembly in vs2012

假装没事ソ 提交于 2019-12-19 16:34:31
问题 I need help on how to correctly add assembly in C# code. I start a blank project and trying to run the simple code below. but has referencing errors. I know by default system.dll is included under the references folder. so why is it still complain that "'System.Configuration is not been referenced"? Am I missing some manual steps? If so how do I do it? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net

How to add reference to assembly in vs2012

我的梦境 提交于 2019-12-19 16:33:40
问题 I need help on how to correctly add assembly in C# code. I start a blank project and trying to run the simple code below. but has referencing errors. I know by default system.dll is included under the references folder. so why is it still complain that "'System.Configuration is not been referenced"? Am I missing some manual steps? If so how do I do it? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net

Is it correct to add a reference to an assembly that is not directly used by the project?

自闭症网瘾萝莉.ら 提交于 2019-12-19 11:20:12
问题 I have a solution composed by 3 projects. one for Entity framework that contains my edmx diagram one for my core business and one for my web app When I publish my code on a server or hosting service I get this runtime error: {"Could not load file or assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.":"EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken

How can I set the name of my program in the Open With dialog?

爷,独闯天下 提交于 2019-12-19 11:05:39
问题 I want the program to read VLC (Move on end) : I've modified my Assembly Info to the following, to no avail: How can I alter the name displayed in the Open With dialog? 回答1: It is stored in the registry as the FriendlyAppName value under HKCR\Applications\YourExeName. Described in this MSDN page. 回答2: Per Hans' answer, this is what did it for me: export.reg Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Applications\VLCMoveOnEnd.exe] "FriendlyAppName"="VLC (Move on end)" [HKEY

Create class instance in assembly from string name

点点圈 提交于 2019-12-19 10:09:41
问题 I'm not sure if this is possible, and I'm quite new to using assemblies in C#.NET. What I would like to do is to create an instance of a class when supplied the string name of that class. Something like this: using MyAssembly; namespace MyNameSpace { Class MyClass { int MyValue1; int MyValue2; public MyClass(string myTypeName) { foreach(Type type in MyAssembly) { if((string)type == myTypeName) { //create a new instance of the type } } AssignInitialValues(//the type created above) } //Here I

Reflecting a WinRT executable from a .Net 4.x App

半城伤御伤魂 提交于 2019-12-19 09:47:33
问题 In a console application; If I execute: Assembly.LoadFrom(@"c:\...\MyWinRTApp.exe") I get: System.BadImageFormatException occurred HResult=-2147024885 Message=Could not load file or assembly 'file:///C:\_...\MyWinRTApp.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. Source=mscorlib Is there any way around this? EDIT 1 In relation to "Vyacheslav Volkov"'s answer below, I now get a step further, thank you. However I now get a different issue.