assemblies

The .NET equivalent of static libraries?

自作多情 提交于 2019-12-09 13:15:22
问题 I'm building a tool in managed code (mostly C++/CLI) in two versions, a 'normal user' version and a 'pro' version. The fact that the core code is identical between the two versions has caused me a little trouble as I want to package the resulting tool as a single assembly (DLL) and I don't want to have to include the .cpp files for the common code in the projects of the two versions of the tools. I'd rather have a project for the common code and a project for each version of the tool and have

C# - Loading .NET Assembly into Separate AppDomain So You Can Unload It [duplicate]

旧街凉风 提交于 2019-12-09 11:44:58
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Loading DLLs into a separate AppDomain What is the proper way to load a .NET assembly into a separate AppDomain so you can have access to its Types/Classes but still be able to unload it (and reload it). This is a tangent of this previous discussion: C# - Correct Way to Load Assembly, Find Class and Call Run() Method 回答1: Basically, you just create the new AppDomain, and then call AppDomain

Could Not Load Assembly .NET 4.0

谁说胖子不能爱 提交于 2019-12-09 04:44:30
问题 whenever I build my web solution I get this error : Could not load file or assembly 'dotless.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=96b446c9e63eae34' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) I have VS 2010 with .NET 4.0 on Windows 7. The dlls are located inside the Bin folder of the Web Application. Any suggestions? Thanks. 回答1: I deleted temporary asp.net files in : C:\users\username\AppData\Local\Temp

Different EntityFramework versions in same solution

这一生的挚爱 提交于 2019-12-08 19:47:58
问题 I have an old Silverlight application that uses EF5 and can't be upgraded to EF6. I have another project that uses EF6 with a different context, but I get: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) I'm assuming this is because EF5 is already loaded (it's in the main project,

WCF service in a precompiled web application - Could not load file or assembly

懵懂的女人 提交于 2019-12-08 08:19:36
问题 I have a solution which contains multiple WAPs ( Web Application projects ). Every WAP has it's own Web Deploy project in order to be able to precompile these sites. On one of the web app we are created a new WCF file with AspNetCompatibilityRequirementsMode.Allowed In debug mode it is working ok, but if i switch to release it crashes: (we are using msbuild to create the deployable versions) Could not load file or assembly 'App_Web_*****, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

Deploying .NET COM dll, getting error (0x80070002)

心已入冬 提交于 2019-12-08 07:06:50
问题 I have a .NET COM assembly I am attempting to deploy to a web server (IIS 6 Win 2003). We have successfully deployed this assembly to our test environment, but the production environment is not working. The assembly is being called from a classic ASP page. Every time that page tries to initialize the assembly with “ Set LTMRender = CreateObject("LTMRender.Render") ”, I get an error “ Error Type:, (0x80070002) ”. This error seems to indicate a permission denied, or file not found type problem.

Change assembly attribute values after the build in .Net

空扰寡人 提交于 2019-12-08 06:22:14
问题 I want to change the assembly attribute like AssemblyTitleAttribute value to something else once the build is done. Is this possible? Its just that we have two types of builds one is base and the other is obfuscated, so we just want to add some changes to title / attribute values without rebiulding the assemblies. 回答1: You could use ildasm to convert the assembly to IL, change the attribute value there and use ilasm to recreate the assembly. This may or may not be considered rebuilding.

Deploying .NET COM dll, getting error (0x80070002)

旧城冷巷雨未停 提交于 2019-12-08 05:25:29
I have a .NET COM assembly I am attempting to deploy to a web server (IIS 6 Win 2003). We have successfully deployed this assembly to our test environment, but the production environment is not working. The assembly is being called from a classic ASP page. Every time that page tries to initialize the assembly with “ Set LTMRender = CreateObject("LTMRender.Render") ”, I get an error “ Error Type:, (0x80070002) ”. This error seems to indicate a permission denied, or file not found type problem. I created a test app to see if the assembly works outside of the web page. The .exe initializes the

Component based architecture: Replacing an assembly at runtime

烂漫一生 提交于 2019-12-08 04:05:23
问题 Is it a good idea to replace an assembly at runtime? What problems can I encounter? Original question: StructureMap - Ability to replace an assembly at runtime What is the difference in replacing an assembly at runtime within a web- and a non-web application? 回答1: The difference is that IIS creates a new shadow copy each time you update a DLL. Hence you get a new AppDomain automatically when you add the new DLL. WinForms etc doesn't do that magic for you and that's why it won't work. 回答2: If

Reference Java DLL in C# Assembly?

╄→尐↘猪︶ㄣ 提交于 2019-12-08 03:36:28
问题 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? 回答1: 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