.net-assembly

WSDL with linked xsds are not compiled dynamically using c#

眉间皱痕 提交于 2019-12-11 08:08:52
问题 I have a following wsdl from a WCF service. <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="Service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/"

Reporting Services - Using a web service via a custom assembly: Finding the endpoint

蓝咒 提交于 2019-12-11 07:54:15
问题 I'm having a problem when using a Custom Assembly in my reports. We are using a Microsoft SQL Server 2012 Express Edition with Reporting Services and are designing our reports in Microsoft Visual Studio 2010 Scenario: In Reporting Services we want to base the language of a report based on a parameter. All the strings are translated with the help of a web service that has a simple "Translate" method. Because we cannot reference to a web service in the report, we used a custom assembly that

Unable to use namespace after referencing assemblys

戏子无情 提交于 2019-12-11 07:32:05
问题 Folks, I am having a problem with a c#, multi-project solution in Visual Studio 2010 SP1. Here is the Solution Structure: BNLib - amy personal library of utilities WidgetClientApp - The asp.net application front end WidgetConsoleUtilities - A console application WidgetCore - contains shared interfaces, classes and enums WidgetMiddleTier - Bussiness logic WidgetDataLayer - DB access via linq to SQL. The problem After adding a reference to the middle tier assembly (WidgetMiddleTier, which

Moq Concrete Class with Internal Constructor

孤人 提交于 2019-12-11 06:27:24
问题 I'm attempting to Moq a concrete class that has an internal constructor, i.e., in MyAssembly I have public class MyClass { internal MyClass(){} // other methods including factory instance method } then in my test in `TestAssembly' I have var mock = new Mock<MyClass>(); in MyAssembly I have added the following to AssemblyInfo.cs [assembly: InternalsVisibleTo("TestAssembly")] but even setting TestAssembly to be a friend of MyAssembly , Moq still throws the error Castle.DynamicProxy

Could not load file or assembly 'System.Data.DataSetExtensions

前提是你 提交于 2019-12-11 06:26:10
问题 This is my first time working with SQL Server 2012 and I'm having a problem getting access to the database. I did a backup and restore from a SQL Server 2008 R2 database, set the logins and permissions, set the database to trustworthy and enabled clr. I'm using a web application (IIS, ASP.Net) to connect to the database. When I point the web server to the new database I get the following error. When I point it to a copy of the database on a SQL Server 2008 R2 machine, it connects. I’m running

AppDomain.AssemblyResolve doesn't work (as expected) with MEF

陌路散爱 提交于 2019-12-11 04:23:32
问题 I have this error: Runtime error CS0234: The type or namespace name 'StiOracleSource' does not exist in the namespace 'Stimulsoft.Report.Dictionary' I developed (VS 2012) an application that uses MEF (.NET 4.5) to interconnect several binary assemblies loaded from a database. One of its separate plug-in assemblies (implemented as an stand-alone executable) has dependency on a third party DLL (Database adapter) that cannot be included in the main application. When I run the plug-in as a stand

How to not load unused assembly

谁说胖子不能爱 提交于 2019-12-11 04:22:50
问题 In ASP.NET MVC4 application System.Data.OracleClient assembly is loaded. Code in controller var sb = new StringBuilder(); foreach (Assembly b in AppDomain.CurrentDomain.GetAssemblies()) sb.AppendLine(b.FullName); Outputs it: System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 According to How to avoid loading unnessecary assemblies answer this is caused by presence of Oracle section in machine.config: <section name="system.data.oracleclient" type=

Load Assembly into a new app domain but not CurrentDomain

天大地大妈咪最大 提交于 2019-12-11 04:08:07
问题 So my problem revolves around saving memory. In essence I need to load an assembly in to a separate app domain other than the main/current domain, check for types within that assembly, and then unload the new domain when done. Currently my solution is as follows: AppDomain NewDomain = AppDomain.CreateDomain("newdomain"); foreach(string path in dllPaths) //string list of dll paths { byte[] dllBytes = File.ReadAllBytes(dll); NewDomain.Load(dllBytes); //offending line } DoStuffWithNewDomain();

Decide class of object to be created from another assembly

血红的双手。 提交于 2019-12-11 03:40:24
问题 I have a .net assembly that exposes a public class (named A) to be created other programs using reflection (Assembly.CreateInstance). For now, it works fine. But now I have two subclasses of A, say A1 and A2, and I need to create one or the other, depending on a runtime check. The client cannot be modified, it should believe that the object returned is of class A. If I were using COM instead of .net, it would be easy enough: simply add the check into the IClassFactory.CreateInstance and be

Library requires reference to System.Windows.Forms

故事扮演 提交于 2019-12-11 03:15:20
问题 I'm having trouble finding information on this topic, possibly because I'm not sure how to phrase the question. Hopefully the braintrust here can help or at least advise. This situation might just be me being retentive but it's bugging me so I thought I'd ask for help on how to get around it. I have a C# library filled with utility classes used in other assemblies. All of my extensions reside in this library and it comes in quite handy. Any of my other libraries or executables that need to