.net-assembly

Could not load file or assembly Temporary ASP.NET Files

廉价感情. 提交于 2019-12-04 01:34:01
I am developing a aps.net website in C# and I am using framework 4. After creating a new website project I tried to run the project. but I am getting the below error Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\myfirst\159977c5\b9e740fc\App_global.asax.yfqtni9g.dll' or one of its dependencies. The system cannot find the file specified. I already went through the below links [and all speaks about access to the folder], but it didn't help me :( Could not load file or assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\

Could not load assembly WebPages.Deployment version 2 at host?

筅森魡賤 提交于 2019-12-03 23:40:19
I have a ASP.NET MVC 2 website (VS2010) that I have upgraded to ASP.NET MVC 3 (VS2012) and this works fin on local IIS7 but when publishing it I get this exception on host : Could not load file or assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. After some seartch I found this that states that I should set CopyLocal on some of the references(inlcuding the System.Web.WebPages) and also use the publish tool in VS2012, but this generated the following exception? Could not load

project.json Equivalent of InternalsVisibleTo

我只是一个虾纸丫 提交于 2019-12-03 23:22:07
.Net Core's project.json allows configuration of various assembly properties (e.g. title, version, copyright) that a traditional .Net application would define using attributes typically placed in AssemblyInfo.cs (e.g. AssemblyTitle , AssemblyCopyright , AssemblyVersion ). However, one assembly property I haven't figured out how to set in project.json is InternalsVisibleTo . Is there a way to use project.json to indicate that another assembly should have internal visibility into the current project? No - just put it in AssemblyInfo.cs as normal. That's still a perfectly fine place to put

Loading DLLs into a separate AppDomain with known only common interface

僤鯓⒐⒋嵵緔 提交于 2019-12-03 17:12:44
I need to load .dll(plugins) in another domain. In main app I don't know anything about plugins types, only that they implement common interface ICommonInterface with some methods. So this code wouldn't help, because I can't create an instance with interface type. AppDomain domain = AppDomain.CreateDomain("New domain name"); //Do other things to the domain like set the security policy string pathToDll = @"C:\myDll.dll"; //Full path to dll you want to load Type t = typeof(TypeIWantToLoad); TypeIWantToLoad myObject = (TypeIWantToLoad)domain.CreateInstanceFromAndUnwrap(pathToDll, t.FullName); My

FileNotFound when load assembly with dependency to another domain

▼魔方 西西 提交于 2019-12-03 16:58:57
问题 I'm trying to make application with plugins. I have MainLib.dll, where I made some commnon interface(let it be ICommon ) with 1 method. Then, I made 2 .dlls(plugins) which have reference to MainLib.dll and implement the ICommon in some classes. Also, I removed all the references in this .dlls exept System . Then, I created an application, which monitors folder ".\\Plugins" and loads all .dlls in newDomain , check if the types in .dll implement ICommon (so this application also reference to

Why are identical types not equal?

旧巷老猫 提交于 2019-12-03 16:13:52
I was developing a small plugin framework and noticed that I couldn't successfully use Type.IsAssignableFrom() to check if a plugin class implements the type IPlugin . I had checked other SO questions (such as this) to see why the function returned false, but to my surprise, none of the suggestions worked. I had a class inside a plugin assembly which implements the PluginAPI.IPlugin class in a referenced assembly. When checking the AssemblyQualifiedName for both my PluginAPI.IPlugin type as well as the types for the plugin class's list of interfaces, I found no difference whatsoever. Both

How to use ICLRStrongName::StrongNameSignatureVerificationEx Method to identify delay signed assemblies

为君一笑 提交于 2019-12-03 16:09:22
Can anybody please suggest how to use ICLRStrongName::StrongNameSignatureVerificationEx method to identify delay signed assembly. I could not find any example in the internet. I am not understanding how to work with this method. Please don't refer me any link, I am almost frustrated with different suggestions and different links available in the web. Can anybody please give code sample for the same. I had the same problem and finally found the time to investigate. I really don't understand why Microsoft did not take the time to write an adequate documentation. Following link is very helpful

Does C# System.String Instances Really End Up on the Heap?

寵の児 提交于 2019-12-03 13:08:23
问题 Let's consider some very simple C# code: static void Main(string[] args) { int i = 5; string s = "ABC"; bool b = false; } Jeffrey Richter's " CLR via C# " (Chapter 14) states that " The String type is derived immediately from Object, making it a reference type, and therefore, String objects (its array of characters) always live in the heap, never on a thread's stack ". Also referring to strings, on an example in the book quite similar to the one above: " The newobj IL instruction constructs a

C# CompilerResults GenerateInMemory?

主宰稳场 提交于 2019-12-03 13:06:14
问题 I've been following this StackOverflow question. Its the closest thing I can find, but not quite. Let me explain what my end goal is before my question, I'm making a compiler platform that's web enabled, because of that, I want to do everything in memory ( make no files ), so I want to be able to compile code, and then be able to reference the objects in the class I just compiled for arbitrary testing. I know how it unsafe it sounds, so input in regard to security is welcome. My question is

MSSQL 2012 creating CLR triggers for WCF fails

本秂侑毒 提交于 2019-12-03 12:24:01
问题 I've created system that uses CLR triggers to connect to WCF server and notify it about changes in DB. It runs ok on SQL server 2008 R2. Now im trying to migrate on SQL Server 2012. To use WCF i need to load SMDiagnostics.dll assembly along the others. Ive checked that clr is enabled in db , and set trustworthy to be "on", ive disabled WCF debuging, ive checked that SQL server runs under Local System account so there is no problems with permissions. Now my problem is that when i run following