.net-assembly

How to resolve .NET Core package version conflicts

自作多情 提交于 2021-02-17 18:55:06
问题 I am migrating from a .NET MVC 5 Web Application to a .NET Core 2.2 Web API project along with five .NET Standard 2.0 projects all housed under one solution. I am now receiving 28 warnings (MSB3277) regarding package conflicts, which are all within the System namespace. For example, there appears to be a version conflict for System.Collections.Concurrent between Version=4.0.11.0 and Version=4.0.14.0 (see error block below). Troubleshooting attempted: I tried uninstalling all of the .NET Core

Is this the location of the GAC?

▼魔方 西西 提交于 2021-02-16 15:09:41
问题 Is this the location of the GAC? C:\Windows\Microsoft.NET\assembly\GAC_MSIL If so, then what is C:\Windows\assembly ? 回答1: The answer depends on the version of the .NET Framework being used. Multiple versions can be installed side by side (which is probably the case for you), and programs written for an older version use that version if it's installed. Before 4.0 All versions before 4.0 use %WINDIR%\assembly (in your case, C:\Windows\assembly ) for the GAC. This directory uses a special

Is this the location of the GAC?

别说谁变了你拦得住时间么 提交于 2021-02-16 15:09:37
问题 Is this the location of the GAC? C:\Windows\Microsoft.NET\assembly\GAC_MSIL If so, then what is C:\Windows\assembly ? 回答1: The answer depends on the version of the .NET Framework being used. Multiple versions can be installed side by side (which is probably the case for you), and programs written for an older version use that version if it's installed. Before 4.0 All versions before 4.0 use %WINDIR%\assembly (in your case, C:\Windows\assembly ) for the GAC. This directory uses a special

Is this the location of the GAC?

北慕城南 提交于 2021-02-16 15:09:16
问题 Is this the location of the GAC? C:\Windows\Microsoft.NET\assembly\GAC_MSIL If so, then what is C:\Windows\assembly ? 回答1: The answer depends on the version of the .NET Framework being used. Multiple versions can be installed side by side (which is probably the case for you), and programs written for an older version use that version if it's installed. Before 4.0 All versions before 4.0 use %WINDIR%\assembly (in your case, C:\Windows\assembly ) for the GAC. This directory uses a special

Is this the location of the GAC?

你离开我真会死。 提交于 2021-02-16 15:08:07
问题 Is this the location of the GAC? C:\Windows\Microsoft.NET\assembly\GAC_MSIL If so, then what is C:\Windows\assembly ? 回答1: The answer depends on the version of the .NET Framework being used. Multiple versions can be installed side by side (which is probably the case for you), and programs written for an older version use that version if it's installed. Before 4.0 All versions before 4.0 use %WINDIR%\assembly (in your case, C:\Windows\assembly ) for the GAC. This directory uses a special

Loading .net wrapper fails to load native dependency

烂漫一生 提交于 2021-02-11 06:30:58
问题 Situation: multiple versions of a .net wrapper class, all named the same with same signature. We want to dynamically load 1 of the wrappers in a wcf service method. I plan to setup folders with each wrapper + dependant dll. We'll use switch or if statements per user choice of version to run. I've got Assembly.LoadFrom with path and can create an instance of the wrapper class. But calling a method in the wrapper fails with "cannot load or find CTV.dll". If I change the machine or user

Is it possible to run tests on an in-memory assembly?

吃可爱长大的小学妹 提交于 2021-02-10 14:25:42
问题 I am currently building a mutationtest framework for .NET. I want to run the unit tests from a project on an in-memory assembly. This way the mutated assembly won't have to be writen to disk and my framework will be faster to use. Using the Roslyn compiler in .Net Core 2.0 I mutate (change) the syntaxtree and compile it into an in-memory assembly like this: Assembly assembly = AssemblyLoadContext.Default.LoadFromStream(ms); Does anyone know of a way to unit test this assembly without writing

Are embedded resources in a .NET Assembly loaded from disk or from memory at runtime?

两盒软妹~` 提交于 2021-02-08 12:16:24
问题 When I use GetManifestResourceStream to retrieve an embedded resource from a .NET assembly, what kind of I/O is involved? I see two possibilities: The entire assembly was already put into memory when .NET loaded it, so GetManifestResourceStream is just accessing memory. Only the code parts of the assembly were put into memory when the assembly was loaded by .NET, so GetManifestResourceStream needs to go back to the .dll file to extract the embedded resource. I'm pretty sure the first is the

Embedded resource file not present at runtime .Net 4

丶灬走出姿态 提交于 2021-02-08 05:40:45
问题 I have a file I need to access at runtime, I've included it in my project and set it up as embedded resource (it's actually a source file, I changed the extension to .cs.txt to get around VS trying to compile it. That shouldn't matter, but I'm mentioning it anyway just in case). When I try getting the file var assembly = Assembly.GetExecutingAssembly(); Stream stream = assembly.GetManifestResourceStream(resourceName); I get a null. I've made sure I'm using the Namespace.Folder.Filename

Set Product Version and File Version to different numbers in C#

余生长醉 提交于 2021-02-07 20:37:39
问题 In a C++ project, I can add different Product Version and File Version values to my assembly using VERSIONINFO in a Version resource file: #define VER_PRODUCTVERSION 1,0,0,0 #define VER_PRODUCTVERSION_STR "1.0\0" #define VER_FILEVERSION 1,0,0,1 #define VER_FILEVERSION_STR "1.0.0.1\0" This appears in the DLL properties as: I'm having trouble achieving the same in a C# project. I've set the following in the AssemblyInfo.cs file: [assembly: AssemblyVersion("1.0")] [assembly: AssemblyFileVersion(