assemblies

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

偶尔善良 提交于 2019-12-05 03:32:23
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 override the following classes: FacebookAuthenticationOptions GoogleOAuth2AuthenticationOptions

Programmatically retrieving assembly version of a running service

岁酱吖の 提交于 2019-12-05 01:38:00
I'd like to access to assembly version information of a service I "control" with ServiceController class. (ie. I'd like to display "2.3.1.23" ), however I can't find any information about retrieving assembly versions ... Is it possible at all? EDIT : Just to clarify ... I only know the name of the service running on the local computer. I want to access the "FileVersionInfo" of that service (better said service exe), however I don't know where is that service exe located. If I understand you correctly, you want to get the version of any service exe. Assuming that you know the name and path of

List all available .NET assemblies

牧云@^-^@ 提交于 2019-12-05 01:15:53
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 Assembly.Loadxxxx() it. Note: It should be done programatically and not using gacutil for example (unless

Why is assembly binding redirect not working in my web site?

梦想与她 提交于 2019-12-04 23:51:06
I have a web site project that I run from Visual Studio using the built in development web server. The virtual path of the web site is set to / The web.config contains a runtime element with <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="CMS.Controls" publicKeyToken="834b12a258f213f9" culture="neutral" /> <bindingRedirect oldVersion="4.1.3518.21577" newVersion="4.1.3561.21846" /> </dependentAssembly> </assemblyBinding> </runtime> I have already removed the xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0" attribute

.csproj's platform specific ItemGroup works for assembly references but not content includes?

北城以北 提交于 2019-12-04 22:41:34
Since we have three assemblies that come in explicit x86 and x64 versions, I've edited the corresponding .csproj file(s) to use, for example, a block like this: <ItemGroup Condition=" '$(Platform)' == 'x86' "> <Reference Include="CaliberRMSDK"> <HintPath>..\Libraries\CaliberRMSDK_IKVM\32bit\CaliberRMSDK.dll</HintPath> </Reference> <Content Include="..\Libraries\CaliberRMSDK_IKVM\32bit\ikvm-native.dll"> <Link>ikvm-native.dll</Link> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="..\Libraries\CaliberRMSDK_IKVM\32bit\JVM.dll"> <Link>JVM.dll</Link>

Load and unload a dll dynamically into my project using AppDomain

落花浮王杯 提交于 2019-12-04 22:41:23
I want to use a class from a different project in a separate solution in my current project dynamically. I thought the solution is to load the dll into my project. I used the following code to do my task and it worked. string dllPath = @"the path of my dll"; var DLL = Assembly.LoadFile(dllPath); foreach (Type type in DLL.GetExportedTypes()) { if (type.Name == "targetClassName") { var c = Activator.CreateInstance(type); try { type.InvokeMember("myMethod", BindingFlags.InvokeMethod, null, c, new object[] { "Params" }); } catch(Exception ex) { MessageBox.Show(ex.Message); } break; } } However, my

How can i see the assembly version of a .NET assembly in Windows Vista and newer (WIndows 7, 2008)?

时光怂恿深爱的人放手 提交于 2019-12-04 22:16:34
In windows 2003 and windows XP you could right click on an assembly (.dll) go to properties, click on the version tab and then you would see 3 different version numbers: Assembly version, file version and product version. If you take that same file and look at its properties in windows 2008, you will only see file version and product version. Is there a way to see the assembly version of a .NET assembly in windows vista and newer (without third part tools)? Gerald Davis No. Not from explorer. It is an intentional move by Microsoft (although I dislike it). You can from powershell though:

Assembly binding and redirect

橙三吉。 提交于 2019-12-04 21:49:59
问题 I have an EXE that reference a DLL - for this example I'll call it TestDLL.dll . The EXE is written in C# and the DLL is written in VB .Net. I created a demo assembly version of the DLL - for example - TestDLL.dll version 1.0.0.0. I want to compile the EXE with a reference to the demo version DLL (1.0.0.0). Afterwards - I want the EXE to use the same DLL, but the one I'll put in the GAC, of any version. In order to do that, I set the "Copy Local" property of the DLL's reference to FALSE . My

Using AssemblyBuilder, how can I make all or any of the referenced assemblies embedded instead of linked in the saved assembly?

自古美人都是妖i 提交于 2019-12-04 20:09:31
I have an executing assembly, which generates another assembly dynamically using AssemblyBuilder. The generated assembly consists of functions which simply test the construction of certain classes in the executing assembly. Since the functions in the generated assembly reference classes in the executing assembly, I want to have the executing assembly embed itself in the assembly it creates. So far, I've only managed to generate an assembly that links to the executing assembly, but not one that embeds it. It's important that I have just one final assembly (.dll). Do I need to embed the assembly

Transferring Assembly over TCP

有些话、适合烂在心里 提交于 2019-12-04 16:44:44
I am currently trying to send a serialized object over a TCP connection as follows - BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(clientStream, (Object)Assembly.LoadFrom("test.dll")); where clientStream is TcpClient tcpClient = (TcpClient)client; NetworkStream clientStream = tcpClient.GetStream(); This is the sending part. But can anyone tell me how do I receive this on the client side (i.e. deserialize it on the other end)? Don't serialize the assembly. Send the assembly itself just by loading it as a file and sending those bytes to the other side. Then, when both