assemblies

how can I embed an assembly into a console application without ILMerge?

不羁岁月 提交于 2019-12-10 11:40:31
问题 There are a lot of posts on here about this, I'm using this code from another SO post and placing a delegate assignation in my Main() method. None of the other posts have directly answered my question. I've got my third party assembly embedded as a resource but when I fire up the app: I'm getting a TypeInitializationException with an inner of FileNotFoundException. It's trying to find the assembly on the file system and failing. it's never getting to the Main method, where the event handler

View current Assembly Version number within VS2008

自古美人都是妖i 提交于 2019-12-10 11:28:14
问题 I would like to know if there is a way to see Assembly Version number of the last completed build within the Visual Studio 2008 IDE. I don't want to see the 1.0.* that is in the Assembly Information dialog box or AssemblyInfo file, but rather the full version (with the *'s replaced by real numbers). I also don't want to have to bring up the Properties of the project's executable or assembly. 回答1: OK, I think I get your question better now, you want to see what the build number is, without

ASP.NET application reference to assembly in programmatically loaded assembly

我们两清 提交于 2019-12-10 10:59:26
问题 My ASP.NET application loads an assembly and creates a class instance from an object within it. The assembly itself has a reference to a dll called "Aspose.Cells.dll" which it can access without any problems and is located on the same path as the assembly file itself. However, when I make a method call to one of its methods I get this error: Could not load file or assembly 'Aspose.Cells, Version=4.1.2.0, Culture=neutral, PublicKeyToken=9a40d5a4b59e5256' or one of its dependencies. I figure

Referencing private .net assemblies in a subfolder

落花浮王杯 提交于 2019-12-10 10:49:24
问题 In Visual Studio 2008 I can add a project reference and set Copy Local property to true. As result the referenced assembly will be copied to the same folder the main assembly is build to. But what if I want to have all referenced assemblies in a subfolder near the main assembly? Something like this: .. myApp.exe Libs myLib1.dll myLib2.dll Data myDatabase.sqlite PS: This is the smart device application build against .NET Compact Framework 3.5 回答1: For other versions of the framework, this is

InternalsVisibleTo causes CS0246 error: The Type or Namespace could not be found

旧街凉风 提交于 2019-12-10 09:05:41
问题 I am trying to enable one assembly to access another assembly's internal classes by adding [assembly:InternalsVisibleTo("assembly-name")] to the second assembly. However, this causes the following error: error CS0246: The type or namespace name 'InternalsVisibleTo' could not be found (are you missing a using directive or an assembly reference?) I am following the examples here: MSDN Reference What am I doing wrong? 回答1: Make sure you import System.Runtime.CompilerServices. Or use a fully

Loading assembly at runtime fails when I copy the DLL after program startup

浪尽此生 提交于 2019-12-10 03:38:01
问题 At runtime I load an assembly with Assembly assembly = Assembly.LoadFrom(@"c:\MyFolder\MyAssembly.dll"); This works if the assembly is in that folder. If the assembly is NOT in the folder I get an exception of course telling me that the assembly or one of its dependencies could not be found. I'm catching the exception and display an error message to the user. The program keeps running. If I copy now the missing assembly to the folder "c:\MyFolder" while the program is still running and

ASP.NET MVC tries to load older version of Owin assembly

五迷三道 提交于 2019-12-10 03:17:16
问题 As a bit of context, I'm developing an ASP.NET MVC 5 application that uses OAuth-based authentication via Microsoft's OWIN implementation, for Facebook and Google only at this stage. Currently (as of v3.0.0, git-commit 4932c2f), the FacebookAuthenticationOptions and GoogleOAuth2AuthenticationOptions don't provide any property to force Facebook nor Google respectively to reauthenticate users (via appending the appropriate query string parameters) when signing in. Initially, I set out to

List all available .NET assemblies

前提是你 提交于 2019-12-10 01:53:02
问题 What is the best way to list all available .NET 2.0 assemblies? An example of the list needed is the one MS Visual Studio shows when you do 'Add Reference...' in the .NET tab. I have read Visual studio uses its own directory configuration and the GAC another and .NET instalation another. Any ideas of how I can know where this directories are in a computer portable way (another computer might have windows installed in D: drive for example)? From the information listed it must be possible to

Embedding Intellisense Xml Documentation in Assembly?

感情迁移 提交于 2019-12-09 14:21:42
问题 I have an assembly containing very thorough XML-based documentation, which is used through Sandcastle to generate the help-files for the product. We also use the output XML files for providing proper Intellisense in Visual Studio when programmers use the assembly obviously. In order to do this, it seems we have do both supply the user with the assembly ("assembly.dll") and the documentation ("assembly.xml"). Is it somehow possible to embed the documentation within the assembly, so we'd only

Is it necessary to change the assemblyIdentity's version attribute in a manifest file?

若如初见. 提交于 2019-12-09 14:20:07
问题 In the following manifest, is it necessary to change the version attribute of the assemblyIdentity element if the assembly version is specified in the project (or, in my case, set as part of a MSBuild task)? According to this Microsoft Connect page, it looks like the project's version number overrides the manifest's version number. Please correct me if I'm wrong... <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1