Questions tagged [.net-assembly]
A group of classes and namespaces compiled into a binary file, written in a .NET-specific language such as C# or VB.NET.
3,354
questions
0
votes
1
answer
44
views
What is the way of creating custom Reactive attribute?
I work with Reactive UI library for my WPF applications and was curious about how does the [Reactive] attribute work. I found out that there is nothing there in the attribute itself so there was a lot ...
3
votes
1
answer
131
views
Strange information when getting app version information
i have a winui 3 app and i am using this code for getting app version info:
assembly = Assembly.GetEntryAssembly();
assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?....
0
votes
0
answers
20
views
"the given assembly name or codebase was invalid. (exception from hresult: 0x80131047)"
I'm facing the exception "the given assembly name or codebase was invalid. (exception from hresult: 0x80131047)".
The .net application where there is a button to generate documents, when i ...
0
votes
1
answer
55
views
How does .NET resolve System.Net.Http at compile time when the referenced assembly version differs from a runtime assembly redirect?
I'm working on a .NET project for a web application, that has the following setup to reference System.Net.Http
.csproj
targets .NET Framework 4.8
references assembly version 4.1.1.3
references a ...
0
votes
1
answer
64
views
How to fix VS Code autocompletion to access all layers of a Python.NET - .NET assembly interface?
I am programming in Python 3 in VS Code, using Python.NET to interface with a .NET based API (AudioPrecision.API.dll). I want to use autocomplete similar to Intellisense in Visual Studio, to make it ...
0
votes
0
answers
48
views
Why aren't the bindingRedirects in web.config working in my Web Project?
(IDE is Jetbrains Rider, in case relevant)
Setup:
Create a blank "ASP.NET Web Application" project
Add dependencies in Nuget:
System.IdentityModel.Tokens.Jwt, version="4.0.4.403061554&...
0
votes
1
answer
32
views
System.BadImageFormatException due to wrong .DLL version
I'm using an external Windos-DLL in my application but when I try to compile my application, I'm getting an error which states:
An exception of type 'System.BadImageFormatException' occurred in
...
0
votes
0
answers
59
views
Problem Visual Studio with Parallels Desktop on MacBook m1
I have a problem with Visual Studio. I have to type an application with one has client with graphic UI in c# and site calculation in assembly (with is connected to c# with dll file). I use MacBook ...
3
votes
1
answer
98
views
Can I achieve type forwarding in .NET without modifying the "from" assembly?
The Problem:
We are trying to move an application from .NET Framework to .NET 8. The application needs to consume some third-party .NET Framework assemblies, one of which uses the Framework-only ...
0
votes
1
answer
115
views
Could not load file or assembly System.Runtime - The assembly reference did not match the assembly definition found
I am not able to run the website in VS2022 and through IIS.
When i checked the event viewer then i found this error which is related to system.runtime dll.
Could not load file or assembly 'System....
2
votes
1
answer
138
views
How to get the name of application(s) currently playing audio with powershell using NAudio?
I'm trying to get the name of applications that are actively playing audio in Windows 11 using the NAudio library.
I'm using the latest official precompiled NAudio.dll v.1.9 as I could not get it ...
0
votes
0
answers
36
views
Can i force a Type loaded in the default AssemblyLoadContext to return a type loaded in my plugin AssemblyLoadContext?
I am migrating an testing application from .NET Framework to .NET. The main purpose was to start another application and run tests on that application with nunit. For the sake of running multiple Test ...
0
votes
0
answers
16
views
SharePoint On-premises Event Receiver: Assembly redirect without modifying web.config
I have SharePoint On-premises project that need to use a third party (DocuSign) assembly. Docusign refers to an older version of Newtonsoft json assembly and there are other assemblies that refer to ...
0
votes
0
answers
17
views
In SSMS, is there a way to display logs directly from a .NET assembly?
I have some procedures with assembly, that should be sent new inserted data to websocker server. Unfortunately, lastly something spoil. It looks like there is some problem in C# assembly part that ...
0
votes
0
answers
30
views
How to provide Object[] as args to Assembly.CreateInstance without knowing the types before hand?
I am trying to write a program with Assembly.CreateInstance() to create an object of a class at Runtime without knowing its constructor parameter types beforehand.
Here's the class definition:
class ...
0
votes
0
answers
38
views
reference to removed assembly persists
I have a Visual Studio solution for a Web Forms application with few projects inside it. Some of the projects are built in dll form and used in the main project. Recently I completely removed from ...
1
vote
0
answers
24
views
Exlpaination of Assembly loading difference between function and class [duplicate]
I got an issue understanding the behaviour of assembly loading in two different cases : script function and assembly.
I have a form with a button that open a [Microsoft.VisualBasic.Interaction]::...
0
votes
1
answer
25
views
Nuget package not adding Framework Assembly references
I have a very simple test library and I want to pack it into a nuget package. It works fine. Dependencies are added. But Framework Assembly References aren't, so I added manually:
<?xml version=&...
0
votes
1
answer
55
views
How to make an extra file a dependency of the assembly I build?
In Visual Studio 2017 I build a class library assembly. The assembly expects certain external file (an rdlc report) in the same directory, so for the rdlc file in the project I specify "Copy to ...
1
vote
1
answer
39
views
Redirecting SideBySide Assemblies
I'm trying to use SideBySide assemblies in my .Net application. The application structure is set up in a way that all assemblies/dependencies are placed in a linked subdirectory. The configuration ...
0
votes
0
answers
37
views
How to force third party assembly to use new version of dependency
I have a third party assembly System.Net.Http.Formatting.dll, which depends on Newtonsoft.Json, version=6.0.0.0. My application has reference for both assembly, but with Newtonsoft.Json, version=13.0....
0
votes
0
answers
16
views
I need help for making my c# windows form project which contains about 8 forms switch between languages using combo box or something that can switch [duplicate]
So , I created this visual studio project using c# and SQL server manager and the system windows form contains about 9 forms / pages and I need to make a selection of languages that I can select from ...
1
vote
0
answers
51
views
Loading platform specific DLLs from "runtimes" folder in .NET 6
I have modular a windows app (exe). App has almost no references to nugets. In other project I have nugget reference to 'System.DirectoryServices'. App loads my other project (module) dynamically ...
1
vote
0
answers
54
views
Reload AssemblyInfo.cs after RunTime modification in c# Web app
I am working on a c# project, where after runtime, I add dependencys into AssemblyInfo.cs using File, based on elements I retrieve from a database.
When i work on local, after the file is modified, ...
1
vote
1
answer
51
views
Powershell: I am creating my own module and struggling at managing external assemblies after I build with ModuleBuilder
I have a few powershell modules I've been working on for awhile and just recently started the process of packaging them with Module Builder. I've had no trouble with modules that don't have any ...
0
votes
0
answers
56
views
WPF - Failed to resolve assembly
Currently I'm trying to resolve an issue with assembly, which is imported from my own custom package and this error causes displaying black window (Which is displayed correctly in the Visualizer ...
-1
votes
1
answer
75
views
Unable to unload Assembly loaded using Custom Assembly Load context
Working on one PoC where i have load and unload assembly on the fly and do Hot reload. i have created custom load context and loading assembly from one folder. Assembly contains only one simple class ...
0
votes
0
answers
77
views
An error relating to security occurred - when loading the project from template Visual Studio 2022
I am trying to move the projects from one solution to another. Visual Studio 2022 was doing a good job in helping me do this until now. Here is what I had been doing
Open source-solution in visual ...
0
votes
1
answer
59
views
How to use Peverify.exe (PEVerify tool)?
I saw a couple of post(this post specifically) talking about using peverify.exe to check whether the .net exe(or dll) contains unsafe code. But no matter what I do I keep getting File not found or has ...
0
votes
1
answer
87
views
In C#, is there a way to "choose" a type by a string/variable? [duplicate]
I'm mapping what will soon be about 30-40 different blocks coming from a CMS by way of JSON which indeed comes with the alias of the block type. Is there a way I can use the alias thats coming through ...
0
votes
0
answers
140
views
CS8010: DLL recompile with dnSpy - agnostic assembly cannot have a processor specific module System.EnterpriseServices.Wrapper.dll
I have a dll to edit Assembly Attributes
but when compile it notify error as my title.
How can I fix this?
I search on internet and find solution that open dll with dnspy32 or 64 and repeat edit, ...
0
votes
0
answers
48
views
How to avoid .dlls being replaced? (dotnet core assembly signing)
We have an interface (IPayment) that abstracts away different provider implementations (Paypal, CreditCard, Wire, Cash, Mock).
We want to ship these providers in one .dll, because this allows us to ...
1
vote
0
answers
100
views
Problem with printing a DYMO label SkiaSharp.Views.Desktop Error
Good morning
I have a problem with printing a DYMO label. I tried to print with the example tutorial on the DYMO Blog but it always gives me this error:
$exception {"Could not load file or ...
0
votes
0
answers
31
views
Audio middleware unity package missing assembly references
I want to use AudioKinetic WWise middleware to implement audio to a mobile game I'm working at the moment but I'm experiencing trouble assembly references thus I'm not able to code the audio scripts I ...
1
vote
2
answers
206
views
Visual Studio adds unnecessary dll files in the output directory
I'm using Visual Studio 2022 preview. I have a .NET 4.8 solution that contains two library projects, to make it simple let's say one is named "First" (which generates "First.dll") ...
1
vote
0
answers
55
views
Dependency resolver in .net
I have 5 projects in my solution:
Project A
Project B
Project C
Project D
Project E
Project A is the starting point of my application.
Now let's take a look at how these projects reference each ...
0
votes
1
answer
323
views
Error: Strong name validation failed for application
I'm facing issue An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module. Could not load file or assembly 'ServiceName, Version=0.0.0.0, Culture=neutral, PublicKeyToken=...
0
votes
0
answers
68
views
C# Net7.0 DbProviderFactories.RegisterFactory() doesn't work if loaded and run in a plugin assembly
I have a class initializing with DbProviderFactories.RegisterFactory() in a plugin assembly, like:
DbProviderFactories.RegisterFactory("System.Data.SqlClient", "System.Data.SqlClient....
0
votes
0
answers
39
views
Dynamically loading UserControl in WPF Assembly missing resources
I have a WPF application with a TabControl where the TabItems are loaded dynamically during runtime. It's not known which tabs will be loaded when the application starts. This is why I use the ...
0
votes
0
answers
15
views
GetManifestResourceStream is always returns null
I am working in project in which we are using Groupdocs.total.lic, and in my main application (ASP.NET MVC), we added nuget packages and executing the below code:
var appAssembly = Assembly....
0
votes
0
answers
101
views
Could not load file or assembly or Assembly binding logging is turned OFF while running an application in IIS
I am trying to host an application in a system and I enabled the IIS for that system. Then I hosted the application and click on the browse option.But in Browser it is showing an error like,
Could not ...
0
votes
0
answers
76
views
Assembly Resolve Context problems
I'm loading an Assembly that references to TPL.DataFlow library and I was having problems because TPL.DataFlow dll was not loading.
As I have read in Microsoft Documentation when using Assembly....
0
votes
0
answers
177
views
[System.Reflection.Assembly]::Load doesn't load the content
I am trying to execute an exe file from the Internet:
$bytes = (Invoke-WebRequest "http://raw.githubusercontent.com/frankwick/t/main/tinytask.exe" ).Content
$assembly = [System.Reflection....
0
votes
1
answer
80
views
Dynamically load an assembly and its classes at runtime
I built a fairly complex system of libraries, I would like another programmer to load one of my assemblies read its properties, call its functions and listen to its events.
At the moment the end ...
1
vote
1
answer
100
views
Using an in-memory assembly as metadata reference in another in-memory assembly in .NET
I'm using Roslyn to compile strings of C# code. I'd like to use the output of one of the compilations as metadata reference for another, but when I try to invoke a method that forces the loading of ...
0
votes
0
answers
40
views
Adding references to my code in Visual Studio
I wanted to use the assembly System.Net.Requests.dll. How could I add this as an assembly in my code?
I tried adding through Reference Manager from Visual Studio. I followed the steps for adding ...
0
votes
1
answer
56
views
Project runs ok, but when project bin folder copied to other machine, getting FileNotFound on Microsoft.Data.SqlClient
My simple .NET 6 command line project builds and runs on my dev machine. All it does is make a connection to a SQL Server instance.
I copy the entire output folder to another machine, and at runtime ...
0
votes
1
answer
486
views
.NET 7.0 Project Reference: "Could not load file or assembly" when loading external Class Library DLL during runtime
I am creating a Class Library DLL (.NET 7.0), and I'm trying to test referencing the DLL from a Console App (.NET 7.0). Visual Studio detects all of the references in the code and there are no build ...
3
votes
0
answers
148
views
warning CS8012: Referenced assembly targets a different processor. What are the consequences?
warning CS8012: Referenced assembly 'NationalInstruments.DAQmx, Version=19.1.45.0, Culture=neutral, PublicKeyToken=4febd62461bf11a4' targets a different processor.
I know what this message is telling ...
0
votes
0
answers
53
views
Assembly attributes added by Mono.Cecil are not reflected in Windows explorer file properties. Why?
I've got the following code.
TLDR: It uses Mono.Cecil to load all attributes from one assembly and copies some of them to the destination assembly.
public void Copy(string pSourceAssemblyPath, ...