assemblies

.NET 4.0 Cannot resolve reference to System.Web.Extensions assembly

爷,独闯天下 提交于 2019-12-08 03:30:41
问题 I'm trying to import System.Web.Script.Serialization so I can deserialize JSON, but in my Imports statement, Visual Studio can't find the System.Web.Extensions assembly. Before you dismiss this, I have already made sure I am not using .NET 4.0 Client, and have tried to reference the assembly through the Reference Manager, through the Properties window, and by dragging and dropping the file directly to the Bin folder, then attempting to reference it. I still get the following error. I have

Exception occured While loading dynamically EXE assembly in C++/CLI (Could not load file or assembly ', Version=1.0.3836.39802 …)

与世无争的帅哥 提交于 2019-12-08 02:29:29
问题 I am facing an exception in C++/CLI while dynamically loading assembly which itself creates an EXE in C++/CLI managed mode using Assembly.Load . It successfully loads a DLL assembly, but fails to load EXE assembly and generates the following exception: An unhandled exception of type 'System.IO.FileLoadException' occurred in TestManager.dll Could not load file or assembly 'testAssembly, Version=1.0.3836.39802, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Attempt to load an

How to figure out dynamically all methods with custom attribute

蹲街弑〆低调 提交于 2019-12-08 02:28:40
问题 I have a simple challenge. I dynamically need to figure out all methods with a specific attribute in C#. I'm going to load the assemblies dynamically from another application and need to find out the exact methods. The assemblies look like the followings: Base.dll: Class Base { [testmethod] public void method1() ... } Derived.dll: Class Derived:Base { [testmethod] public void method2() } Now in 3rd application I dynamically like to load the above mentioned dlls and find out testmethods. If I

How can I use the SSRS ReportViewer from VS 2008 in a VS2010 project?

你离开我真会死。 提交于 2019-12-07 16:44:37
问题 I'm working on an ASP.NET MVC 2 / .NET 3.5 project which includes SSRS 2008 reports. After migrating to VS 2010 RC, the new web forms report viewer has been giving so much trouble that I'd like to use the old report viewer from VS 2008 again. Now I'm just wondering what would be the easiest way to do that. The report viewer is embedded in a Webforms ASPX file which is loaded in an IFrame by the the MVC view. Report parameters are currently stored as session variables, and for security reasons

Reference Java DLL in C# Assembly?

房东的猫 提交于 2019-12-07 15:25:31
There are instructions here to create a C# assembly using the SimMetrics library. The link they provided to this library is at SourceForge . It looks like the most recent version of the SimMetrics library was created in Java. Is it possibly to compile java code and then reference it in C# to be used as an assembly in SQL Server 2008? The best you can do is compile the java as J# (now obsolete and largely unsupported) with minimal code changes. this is very dependent on how much of the libraries are used. convert the code to c# (idiomatic or otherwise) this can sometimes be fairly easy on

put build date in about box

a 夏天 提交于 2019-12-07 11:19:48
问题 I have a C# WinForms app with an About box. I am putting the version number in the about box using: FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location) .FileVersion This ends up giving me the Subversion revision number from which the executable was built. I would also like to get the date of the build into the About box. I tried: File.GetLastWriteTime(Assembly.GetEntryAssembly().Location) But that gives me the write date of the executable, which only corresponds to the

Error with existing COM Reference or adding a new one

蓝咒 提交于 2019-12-07 09:46:11
问题 Let me preface this by saying that I am unfamiliar with COM references, and I am using VS2010 on a Windows 7 64 bit machine. This morning I pulled down an existing project from TFS. I then tried to build the project and received this error: The type or namespace name 'validatecom' could not be found (are you missing a using directive or an assembly reference?) And I get this warning: Cannot get the file path for type library "d0b51ccc-aa31-47a1-b3ff-b8ed71c522a1" version 1.0. Library not

When does the CLR load an assembly in a .NET process?

倖福魔咒の 提交于 2019-12-07 08:44:30
问题 Is a .NET assembly loaded by the CLR when a class from the assembly is referenced? Or When a class which declares the using namespace from the assembly is loaded? Also having loaded an assembly, does it ever unloads the assembly if it is not used for a long time? 回答1: It's the JIT compiler that instructs the CLR to load an assembly once it has translated it to machine code which is done on demand and the exact time is not deterministic. As to the second question, once an assembly is loaded

How to operate with multiple assembly versions in private folders using config?

对着背影说爱祢 提交于 2019-12-07 07:46:15
问题 I have a scenario where I have multiple versions of the same assembly that I need to store in the application private folders, in a structure like this: .\My.dll // latest version, say 1.1.3.0 .\v1.1.1\My.dll // version 1.1.1.0 .\v1.1.2\My.dll // version 1.1.2.0 My problem is that the .Net runtime, when asked for one of the older versions, always finds the latest version and then fails due to build number mismatch before trying to probe for a better match. The assemblies are strong named and

Pass a C++/CLI wrapper of a native type to another C++/CLI assembly

两盒软妹~` 提交于 2019-12-07 07:10:07
问题 Suppose I have the following simple wrapper of a NativeClassInstance. public ref class Wrapper { private: NativeClass *_wrapped; public: Renderer() { _wrapped = new NativeClass(); } ~Renderer() { delete _wrapped; } operator NativeClass*() { return _wrapped; } } Now, I want to create an instance of Wrapper from C# with Wrapper wrapper = new Wrapper() and use it in another native functionalities wrapper that resides in another assembly with Helper.Foo(wrapper) (nothing strange having other